Fix typo and add error handling 06/91006/1 accepted/tizen/3.0/ivi/20161028.151315 accepted/tizen/3.0/mobile/20161015.034410 accepted/tizen/3.0/mobile/20161028.143225 accepted/tizen/3.0/tv/20161016.010043 accepted/tizen/3.0/tv/20161028.143511 accepted/tizen/3.0/wearable/20161015.084439 accepted/tizen/3.0/wearable/20161028.150851 accepted/tizen/common/20161005.165422 accepted/tizen/ivi/20161007.003923 accepted/tizen/mobile/20161007.003655 accepted/tizen/tv/20161007.003813 accepted/tizen/wearable/20161007.003850 submit/tizen/20161005.055916 submit/tizen_3.0/20161028.062323 submit/tizen_3.0/20161028.092423 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_mobile/20161015.000007 submit/tizen_3.0_tv/20161015.000006 submit/tizen_3.0_wearable/20161015.000006
authorKwangyoun Kim <ky85.kim@samsung.com>
Wed, 5 Oct 2016 09:34:43 +0000 (18:34 +0900)
committerKwangyoun Kim <ky85.kim@samsung.com>
Wed, 5 Oct 2016 09:35:05 +0000 (18:35 +0900)
Change-Id: I6d1d39fb11ece24b6521c18cad3e18a4ea4ec27e

client/vc_mgr_client.c
include/voice_control_manager.h

index 4f01521..328ff33 100644 (file)
@@ -706,6 +706,9 @@ int vc_mgr_client_set_error_message(vc_h vc, const char* err_msg)
 
        if (NULL != err_msg) {
                client->err_msg = strdup(err_msg);
+               if (NULL == client->err_msg) {
+                       return VC_ERROR_OUT_OF_MEMORY;
+               }
        }
 
        return 0;
@@ -721,6 +724,9 @@ int vc_mgr_client_get_error_message(vc_h vc, char** err_msg)
 
        if (NULL != client->err_msg) {
                *err_msg = strdup(client->err_msg);
+               if (NULL == *err_msg) {
+                       return VC_ERROR_OUT_OF_MEMORY;
+               }
        }
 
        return 0;
index abcd864..32f4cd7 100644 (file)
@@ -904,7 +904,7 @@ int vc_mgr_unset_current_language_changed_cb();
 /**
 * @brief Gets the current error message.
 *
-* @remarks This function should be called during as stt error callback. If not, the error as operation failure will be returned. \n
+* @remarks This function should be called during as vc error callback. If not, the error as operation failure will be returned. \n
 *       If the function succeeds, @a err_msg must be released using free() when it is no longer required.
 *
 * @param[out] err_msg The current error message
@@ -914,6 +914,7 @@ int vc_mgr_unset_current_language_changed_cb();
 * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #VC_ERROR_INVALID_STATE Invalid state
 * @retval $VC_ERROR_OPERATION_FAILED Operation failure
+* @retval #VC_ERROR_OUT_OF_MEMORY Out of memory
 *
 * @see vc_error_cb()
 */