aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmpdclient.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* libmpdclient: added another connection->sock checkMax Kellermann2008-09-211-0/+6
| | | | Check if connection->sock is valid in mpd_executeCommand().
* libmpdclient: check connection->sock >= 0Max Kellermann2008-09-211-0/+10
| | | | | mpd_wait() must not be called when the socket is dead; add an assertion there. In mpd_recv(), add a run-time check.
* libmpdclient: added resolver libraryMax Kellermann2008-09-181-199/+74
| | | | | | | The resolver library provides unified access to all resolvers (getaddrinfo(), gethostbyname(), Unix domain sockets). Like getaddrinfo(), it can return more than one address for a host name. This fixes bug 1517 (http://www.musicpd.org/mantis/view.php?id=1517).
* libmpdclient: moved code to mpd_recv(), mpd_wait()Max Kellermann2008-09-181-90/+129
| | | | | | Create generic utility functions for doint I/O: two wait functions, and mpd_recv() fills the input buffer. These functions are used in mpd_newConnection() and mpd_getNextReturnElement().
* libmpdclient: smaller input bufferMax Kellermann2008-09-181-4/+4
| | | | | Even for large responses, 16kB should be enough. There is no performance gain for larger buffers, even if MPD is local.
* libmpdclient: smaller error bufferMax Kellermann2008-09-181-20/+22
| | | | | | | 512 characters should be well enough for error messages which are actually being displayed somewhere. Use sizeof(errorStr) instead of MPD_BUFFER_MAX_LENGTH everywhere. Do proper length checking when copying the output buffer to errorStr.
* libmpdclient: use memmove() instead of strcpy() for moving the bufferMax Kellermann2008-09-181-8/+8
| | | | | | | In general, don't treat the input buffer as a null-terminated string: don't append '\0', don't use strchr() and strtok(). To delete consumed portions of the buffer, strcpy() is bad anyway, because it does not allow overlapping buffers.
* libmpdclient: don't strdup() MPD's welcome messageMax Kellermann2008-09-181-7/+3
| | | | | Why bother duplicating the buffer, when we can simply parse the response directly from the input buffer?
* libmpdclient: use size_t and ssize_tMax Kellermann2008-09-181-2/+2
| | | | | | When working with buffer lengths and recv() results, we should declare size_t and ssize_t variables, otherwise the code may fail on 64 bit machines.
* code style, indent with tabs IVMax Kellermann2008-09-171-38/+36
| | | | Follow the same code style als MPD itself.
* libmpdclient: moved code to song.cMax Kellermann2008-09-161-67/+0
| | | | | Move everything which manipulates the mpd_Song struct to song.c. Thousands of lines of too much for libmpdclient.c!
* libmpdclient: const pointersMax Kellermann2008-09-161-1/+1
| | | | Pass const pointers whenever possible.
* manage tag string allocations in a poolMax Kellermann2008-09-151-43/+44
| | | | | | There are many duplicated strings in the tag database, e.g. many songs having the same artist. Don't allocate such strings twice, manage all strings in a pool.
* added support for unix domain socketsMax Kellermann2008-09-151-1/+58
| | | | | | If a host name starts with a slash, it is assumed to be a unix domain socket path. The port is ignored. This code is disabled on WIN32, until someone tests it.
* const pointersMax Kellermann2008-09-151-5/+6
| | | | | Convert pointers to const whenever it is possible. Fixes all those -Wconst warnings.
* code style, indent with tabsMax Kellermann2008-09-151-6/+9
| | | | | | | Follow the same code style als MPD itself. This patch only fixes parts of the code which are going to be touched in the following bunch of patches, i.e. there will be more "code style" patches in the future.
* remove unused static functionsMax Kellermann2008-09-151-2/+3
| | | | Also remove some commented code and unused function parameters.
* the updated sourcesAndreas Obergrusberger2006-08-041-402/+527
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4543 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* IPv6 patch from Jelmer VernooijKalle Wallin2006-03-281-81/+50
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3963 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Test new search functionality with qball's version of libmpdclientKalle Wallin2005-06-161-4/+162
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3360 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* libmpdclient updateKalle Wallin2005-06-051-15/+40
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3320 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Updated libmpdclient to r2897Kalle Wallin2005-01-231-4/+5
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2898 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* libmpdclient updateAvuton Olrich2005-01-191-2/+88
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2889 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Updated libmpdclient to r1743Kalle Wallin2004-06-301-17/+36
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1744 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* libmpdclient updated (r1507) - added path to mpdclient_cmd_db_update() Kalle Wallin2004-06-161-3/+8
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1508 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Major cleanup of the mpd client code (mpc->mpdclient)Kalle Wallin2004-06-141-76/+194
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1481 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Check playlist length and remove songs (plchanges command)Kalle Wallin2004-06-081-3/+3
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1393 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Support plchangesKalle Wallin2004-06-071-7/+40
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1380 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Changed directory layout (for future use of gettext)Kalle Wallin2004-06-051-0/+1211
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1342 09075e82-0dd4-0310-85a5-a0d7c8717e4f