diff options
author | Kalle Wallin <kaw@linux.se> | 2004-06-08 13:15:03 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-06-08 13:15:03 +0000 |
commit | fadbcce56a23b440a7d7782b235ccc38c20be84e (patch) | |
tree | ea8ca8a99edd77eff774d4c75ac9d6f429ddd159 /src/libmpdclient.c | |
parent | d98fbf6d5f1a60d3a6ae561dbc6df955876e10fc (diff) | |
download | mpd-fadbcce56a23b440a7d7782b235ccc38c20be84e.tar.gz mpd-fadbcce56a23b440a7d7782b235ccc38c20be84e.tar.xz mpd-fadbcce56a23b440a7d7782b235ccc38c20be84e.zip |
Check playlist length and remove songs (plchanges command)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1393 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/libmpdclient.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmpdclient.c b/src/libmpdclient.c index a879b53e6..b61e2d1e9 100644 --- a/src/libmpdclient.c +++ b/src/libmpdclient.c @@ -469,13 +469,13 @@ void mpd_getNextReturnElement(mpd_Connection * connection) { strcpy(connection->errorStr, output); connection->error = MPD_ERROR_ACK; - connection->errorCode = MPD_ERROR_CODE_UNK; + connection->errorCode = MPD_ACK_ERROR_UNK; connection->errorAt = MPD_ERROR_AT_UNK; connection->doneProcessing = 1; needle = strchr(output, '['); if(!needle) return; - val = strtol(needle, &test, 10); + val = strtol(needle+1, &test, 10); if(*test != '@') return; connection->errorCode = val; val = strtol(test+1, &test, 10); @@ -966,7 +966,7 @@ void mpd_sendPlaylistInfoCommand(mpd_Connection * connection, int songNum) { void mpd_sendPlChangesCommand(mpd_Connection * connection, long long playlist) { char * string = malloc(strlen("plchanges")+25); - sprintf(string,"plchanges \"%i\"\n",playlist); + sprintf(string,"plchanges \"%lld\"\n",playlist); mpd_sendInfoCommand(connection,string); free(string); } |