mc_debug("filter[%s.%s] is unregistered. Remaining filters: [%d]", server_name, signal_name, g_list_length(*filter_list));
} else {
/* Unregister all filters */
- for (iter = *filter_list; iter; iter = iter->next) {
+ for (iter = *filter_list; iter; iter = g_list_next(iter)) {
mc_debug("filter[%s.%s]", (char *)(iter->data), signal_name);
ret = _mc_ipc_unregister_filter_listener(&mc_client->listeners, (char *)(iter->data), signal_name);
mc_retvm_if(!mc_client->updated_cb[subscription_type].filter_list, MEDIA_CONTROLLER_ERROR_NONE,
"No filter list for the subscription_type [%d]", subscription_type);
- for (iter = mc_client->updated_cb[subscription_type].filter_list; iter; iter = iter->next) {
+ for (iter = mc_client->updated_cb[subscription_type].filter_list; iter; iter = g_list_next(iter)) {
if (!MC_STRING_VALID(iter->data))
continue;
if (!callback(iter->data, user_data))
mc_debug("mc_search_foreach_condition length [%d]", g_list_length(mc_search->search_list));
- for (iter = mc_search->search_list; iter; iter = iter->next) {
+ for (iter = mc_search->search_list; iter; iter = g_list_next(iter)) {
search_item = (mc_search_item_s*)iter->data;
if (!search_item)
continue;
ret = mc_search_create(&_dst);
mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "fail to mc_search_create()");
- for (iter = _src->search_list; iter; iter = iter->next) {
+ for (iter = _src->search_list; iter; iter = g_list_next(iter)) {
search_item = (mc_search_item_s*)iter->data;
if (!search_item) {
mc_error("Invalid item [%p]", iter->data);
- ret = MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER;
mc_search_destroy(_dst);
- break;
+ return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER;
}
- ret = mc_search_set_condition(_dst, search_item->content_type, search_item->category, search_item->search_keyword, search_item->data);
+ ret = mc_search_set_condition(_dst, search_item->content_type, search_item->category, search_item->search_keyword, search_item->data);
+ if (ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ mc_error("mc_search_set_condition failed(%d).", ret);
+ mc_search_destroy(_dst);
+ return ret;
+ }
}
*dst = _dst;
bundle = bundle_create();
mc_retvm_if(!bundle, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "fail to bundle_create");
- for (iter = playlist; iter; iter = iter->next) {
+ for (iter = playlist; iter; iter = g_list_next(iter)) {
item = (mc_playlist_item_s*)iter->data;
if (!item || !item->index || !item->metadata) {
mc_retm_if(!MC_STRING_VALID(_user_data->message->msg), "Invalid msg");
mc_retm_if(!_app_data->cmds_to_send, "Nothing to remove");
- for (iter = _app_data->cmds_to_send; iter; iter = iter->next) {
+ for (iter = _app_data->cmds_to_send; iter; iter = g_list_next(iter)) {
if (!iter->data)
continue;
mc_retvm_if(!_service_data, AUL_R_ERROR, "data is null!");
mc_retvm_if(!_service_data->connected_apps, AUL_R_OK, "No connected application!");
- for (iter = _service_data->connected_apps; iter; iter = iter->next) {
+ for (iter = _service_data->connected_apps; iter; iter = g_list_next(iter)) {
_app_data = (mc_app_data_set_t *)iter->data;
if ((!_app_data) || (_app_data->pid != pid))
if (ret != MEDIA_CONTROLLER_ERROR_NONE)
mc_error("Fail to mc_playlist_foreach_playlist [%d]", ret);
- for (iter = playlist_list; iter; iter = iter->next) {
+ for (iter = playlist_list; iter; iter = g_list_next(iter)) {
mc_playlist_h playlist = NULL;
char *playlist_name = NULL;