diff options
author | Kalle Wallin <kaw@linux.se> | 2005-01-23 16:36:15 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2005-01-23 16:36:15 +0000 |
commit | c12435f8656b2f42cdade1ff4363e12d8d1e07ad (patch) | |
tree | 3d7cced6661c0f8c9b0dd6eb9eed4f3dc59f3266 | |
parent | 54bc143205c8b44dec769d62c4ffb5dd44bebcee (diff) | |
download | mpd-c12435f8656b2f42cdade1ff4363e12d8d1e07ad.tar.gz mpd-c12435f8656b2f42cdade1ff4363e12d8d1e07ad.tar.xz mpd-c12435f8656b2f42cdade1ff4363e12d8d1e07ad.zip |
Updated libmpdclient to r2897
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2898 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/libmpdclient.c | 9 |
2 files changed, 11 insertions, 4 deletions
@@ -1,6 +1,12 @@ +2005-01-23: Kalle Wallin <kaw@linux.se> + * libmpdclient updated to 2897 + 2005-01-20: Kalle Wallin <kaw@linux.se> * Added French translations from Yann Cézard +2005-01-19: shb + * libmpdclient updated to r2890 + 2005-01-03: Kalle Wallin <kaw@linux.se> * Added Russian translations from Nikolay Pavlov diff --git a/src/libmpdclient.c b/src/libmpdclient.c index 2ab4e28cf..e93b3947e 100644 --- a/src/libmpdclient.c +++ b/src/libmpdclient.c @@ -410,14 +410,13 @@ void mpd_getNextReturnElement(mpd_Connection * connection) { bufferCheck = connection->buffer+connection->bufstart; while(connection->bufstart>=connection->buflen || - !(rt = strstr(bufferCheck,"\n"))) { + !(rt = strchr(bufferCheck,'\n'))) { if(connection->buflen>=MPD_BUFFER_MAX_LENGTH) { memmove(connection->buffer, connection->buffer+ connection->bufstart, connection->buflen- connection->bufstart+1); - bufferCheck-=connection->bufstart; connection->buflen-=connection->bufstart; connection->bufstart = 0; } @@ -428,7 +427,7 @@ void mpd_getNextReturnElement(mpd_Connection * connection) { connection->doneListOk = 0; return; } - bufferCheck+=connection->buflen-connection->bufstart; + bufferCheck = connection->buffer+connection->buflen; tv.tv_sec = connection->timeout.tv_sec; tv.tv_usec = connection->timeout.tv_usec; FD_ZERO(&fds); @@ -438,7 +437,9 @@ void mpd_getNextReturnElement(mpd_Connection * connection) { connection->buffer+connection->buflen, MPD_BUFFER_MAX_LENGTH-connection->buflen, #ifdef WIN32 - ioctlsocket(connection->sock, commandLen, commandPtr)); + ioctlsocket(connection->sock, + commandLen, + commandPtr)); #endif #ifndef WIN32 MSG_DONTWAIT); |