aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-15 23:28:19 +0200
committerMax Kellermann <max@duempel.org>2012-08-16 00:04:14 +0200
commit3b8532f3fb379c7ecc6b64eecbbf9c824d18e875 (patch)
tree3313a43df3f120b74166749fdd75b07fa89846ba /src/command.c
parentf45616e5f6f7d6aa0fb5ca90a0599eacddf1166b (diff)
downloadmpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.tar.gz
mpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.tar.xz
mpd-3b8532f3fb379c7ecc6b64eecbbf9c824d18e875.zip
DatabasePlugin: add method ReturnSong()
Allow the plugin to allocate the GetSong() return value.
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/command.c b/src/command.c
index 5bc6934c5..b4f8e7039 100644
--- a/src/command.c
+++ b/src/command.c
@@ -1326,6 +1326,7 @@ handle_sticker_song(struct client *client, int argc, char *argv[])
}
value = sticker_song_get_value(song, argv[4]);
+ db_return_song(song);
if (value == NULL) {
command_error(client, ACK_ERROR_NO_EXIST,
"no such sticker");
@@ -1349,6 +1350,7 @@ handle_sticker_song(struct client *client, int argc, char *argv[])
}
sticker = sticker_song_get(song);
+ db_return_song(song);
if (sticker) {
sticker_print(client, sticker);
sticker_free(sticker);
@@ -1368,6 +1370,7 @@ handle_sticker_song(struct client *client, int argc, char *argv[])
}
ret = sticker_song_set_value(song, argv[4], argv[5]);
+ db_return_song(song);
if (!ret) {
command_error(client, ACK_ERROR_SYSTEM,
"failed to set sticker value");
@@ -1391,6 +1394,7 @@ handle_sticker_song(struct client *client, int argc, char *argv[])
ret = argc == 4
? sticker_song_delete(song)
: sticker_song_delete_value(song, argv[4]);
+ db_return_song(song);
if (!ret) {
command_error(client, ACK_ERROR_SYSTEM,
"no such sticker");