aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmpdclient.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-06-16 11:13:27 +0000
committerKalle Wallin <kaw@linux.se>2004-06-16 11:13:27 +0000
commit4fce016e7a873d941899c509bd0a5be3f46ea1b8 (patch)
tree37e18811f1322886f8762b4a4c7d2beb74f00ac5 /src/libmpdclient.c
parent7857a69fb3c57714a593c71956606e2bae4543c9 (diff)
downloadmpd-4fce016e7a873d941899c509bd0a5be3f46ea1b8.tar.gz
mpd-4fce016e7a873d941899c509bd0a5be3f46ea1b8.tar.xz
mpd-4fce016e7a873d941899c509bd0a5be3f46ea1b8.zip
libmpdclient updated (r1507) - added path to mpdclient_cmd_db_update()
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1508 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/libmpdclient.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libmpdclient.c b/src/libmpdclient.c
index 089e7201f..01386ac5a 100644
--- a/src/libmpdclient.c
+++ b/src/libmpdclient.c
@@ -101,7 +101,7 @@ mpd_Connection * mpd_newConnection(const char * host, int port, float timeout) {
int err;
struct hostent * he;
struct sockaddr * dest;
-#ifdef MPD_HAVE_SOCKLEN_T
+#ifdef HAVE_SOCKLEN_T
socklen_t destlen;
#else
int destlen;
@@ -1265,8 +1265,13 @@ void mpd_sendSeekIdCommand(mpd_Connection * connection, int id, int time) {
free(string);
}
-void mpd_sendUpdateCommand(mpd_Connection * connection) {
- mpd_executeCommand(connection,"update\n");
+void mpd_sendUpdateCommand(mpd_Connection * connection, char * path) {
+ char * sPath = mpd_sanitizeArg(path);
+ char * string = malloc(strlen("update")+strlen(sPath)+5);
+ sprintf(string,"update \"%s\"\n",sPath);
+ mpd_sendInfoCommand(connection,string);
+ free(string);
+ free(sPath);
}
int mpd_getUpdateId(mpd_Connection * connection) {