Change the server check for activate and exist 21/209721/3 accepted/tizen/unified/20190715.111808 submit/tizen/20190715.042823
authorjiyong.min <jiyong.min@samsung.com>
Wed, 10 Jul 2019 08:11:32 +0000 (17:11 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Wed, 10 Jul 2019 08:21:06 +0000 (17:21 +0900)
Change-Id: I93199e12482b38dc39e978eac3ff5da8d5f6babb

src/media_controller_client.c

index 81e007d..6e7d05c 100644 (file)
@@ -520,7 +520,7 @@ static int __mc_client_send_command(mc_client_h client, const char *server_name,
        mc_retvm_if(!MC_STRING_VALID(command_type), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid command_type");
        mc_retvm_if(!MC_STRING_VALID(signal_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid signal_name");
        mc_retvm_if(!MC_STRING_VALID(message), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid message");
-       mc_retvm_if(!mc_db_is_exist_server(mc_client->db_handle, server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name");
+       mc_retvm_if(!_mc_db_is_activated_server(mc_client->db_handle, server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name");
 
        ret = mc_util_set_command_available(MC_PRIV_TYPE_CLIENT, mc_client->client_name, command_type, command);
        mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "Error mc_util_set_command_available [%d]", ret);
@@ -1026,7 +1026,7 @@ static int __mc_client_verify_ability(mc_client_h client, const char *server_nam
        mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
 
        mc_retvm_if(!mc_client, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid handle");
-       mc_retvm_if(!mc_db_is_server_table_exist(mc_client->db_handle, server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name");
+       mc_retvm_if(!_mc_db_is_activated_server(mc_client->db_handle, server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name");
 
        ret = mc_db_get_ability_supported(mc_client->db_handle, server_name, ability, &supported);
        mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "fail to get ability");
@@ -1264,7 +1264,7 @@ int mc_client_send_search_cmd(mc_client_h client, const char *server_name, mc_se
 
        mc_retvm_if(mc_client == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL");
        mc_retvm_if(!MC_STRING_VALID(server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name");
-       mc_retvm_if(!mc_db_is_exist_server(mc_client->db_handle, server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name");
+       mc_retvm_if(!_mc_db_is_activated_server(mc_client->db_handle, server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name");
 
        ret = __mc_client_get_bundle_from_search(search, &bundle_data);
        mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "Error __mc_client_get_bundle_from_search [%d]", ret);