summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/media_controller_server.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/media_controller_server.c b/src/media_controller_server.c
index c4abf86..6e4380f 100755
--- a/src/media_controller_server.c
+++ b/src/media_controller_server.c
@@ -957,11 +957,18 @@ int mc_server_update_playlist_done(mc_server_h server, mc_playlist_h playlist)
}
ret = mc_db_update_playlist(mc_server->db_handle, mc_server->server_name, _playlist->playlist_name, query_list);
- mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "fail to mc_db_update_playlist");
+ if (ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ mc_error("fail to mc_db_update_playlist");
+ goto RELEASE;
+ }
ret = __mc_server_send_message(mc_server, MC_DBUS_UPDATE_INTERFACE, MC_DBUS_SIGNAL_NAME_PLAYLIST, MC_PLAYLIST_UPDATED, 0, _playlist->playlist_name);
- mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "fail to __mc_server_send_message");
+ if (ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ mc_error("fail to __mc_server_send_message");
+ goto RELEASE;
+ }
+RELEASE:
for (idx = 0; idx < length; idx++) {
__mc_server_playlist_item_release((mc_playlist_item_s*)g_list_nth_data(_playlist->item_list, idx));
}