aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-06-30 17:20:04 +0000
committerKalle Wallin <kaw@linux.se>2004-06-30 17:20:04 +0000
commitc4c272e230fc2da67aa858c0722e95bfd0e8cae7 (patch)
tree09b6dbf188082dce9ad73e4f95de2ba3bd984723
parent919b0f13474fd323c7cd9e0b872b1990068a012d (diff)
downloadmpd-c4c272e230fc2da67aa858c0722e95bfd0e8cae7.tar.gz
mpd-c4c272e230fc2da67aa858c0722e95bfd0e8cae7.tar.xz
mpd-c4c272e230fc2da67aa858c0722e95bfd0e8cae7.zip
Updated libmpdclient to r1743
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1744 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/libmpdclient.c53
-rw-r--r--src/libmpdclient.h48
2 files changed, 67 insertions, 34 deletions
diff --git a/src/libmpdclient.c b/src/libmpdclient.c
index 01386ac5a..e536af8a4 100644
--- a/src/libmpdclient.c
+++ b/src/libmpdclient.c
@@ -1,21 +1,35 @@
/* libmpdclient
- * (c)2003-2004 by Warren Dukes (shank@mercury.chem.pitt.edu)
- * This project's homepage is: http://www.musicpd.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
+ (c)2003-2004 by Warren Dukes (shank@mercury.chem.pitt.edu)
+ This project's homepage is: http://www.musicpd.org
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of the Music Player Daemon nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
#include "libmpdclient.h"
@@ -402,6 +416,7 @@ void mpd_getNextReturnElement(mpd_Connection * connection) {
strcpy(connection->errorStr,"buffer overrun");
connection->error = MPD_ERROR_BUFFEROVERRUN;
connection->doneProcessing = 1;
+ connection->doneListOk = 0;
return;
}
bufferCheck+=connection->buflen-connection->bufstart;
@@ -422,6 +437,7 @@ void mpd_getNextReturnElement(mpd_Connection * connection) {
" closed");
connection->error = MPD_ERROR_CONNCLOSED;
connection->doneProcessing = 1;
+ connection->doneListOk = 0;
return;
}
connection->buflen+=readed;
@@ -432,6 +448,7 @@ void mpd_getNextReturnElement(mpd_Connection * connection) {
strcpy(connection->errorStr,"connection timeout");
connection->error = MPD_ERROR_TIMEOUT;
connection->doneProcessing = 1;
+ connection->doneListOk = 0;
return;
}
}
@@ -447,6 +464,7 @@ void mpd_getNextReturnElement(mpd_Connection * connection) {
}
connection->listOks = 0;
connection->doneProcessing = 1;
+ connection->doneListOk = 0;
return;
}
@@ -473,6 +491,7 @@ void mpd_getNextReturnElement(mpd_Connection * connection) {
connection->errorCode = MPD_ACK_ERROR_UNK;
connection->errorAt = MPD_ERROR_AT_UNK;
connection->doneProcessing = 1;
+ connection->doneListOk = 0;
needle = strchr(output, '[');
if(!needle) return;
diff --git a/src/libmpdclient.h b/src/libmpdclient.h
index 2208faf22..04b70fd94 100644
--- a/src/libmpdclient.h
+++ b/src/libmpdclient.h
@@ -1,21 +1,35 @@
/* libmpdclient
- * (c)2003-2004 by Warren Dukes (shank@mercury.chem.pitt.edu)
- * This project's homepage is: http://www.musicpd.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
+ (c)2003-2004 by Warren Dukes (shank@mercury.chem.pitt.edu)
+ This project's homepage is: http://www.musicpd.org
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of the Music Player Daemon nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
#ifndef LIBMPDCLIENT_H
#define LIBMPDCLIENT_H