}
}
-int __vc_cb_error(int reason, int daemon_pid, char* msg)
+int __vc_cb_error_to_app(int pid, int reason, const char* msg)
{
- vc_state_e state;
- if (0 != vc_client_get_client_state(&state)) {
- SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Invalid client");
- return VC_ERROR_INVALID_PARAMETER;
- }
-
- /* check state */
- if (state != VC_STATE_READY) {
- SLOG(LOG_DEBUG, TAG_VCC, "[DEBUG] State is not READY");
- if (VC_ERROR_SERVICE_RESET != reason) {
- SLOG(LOG_ERROR, TAG_VCC, "[ERROR] not connected client yet(%d)", reason);
- return VC_ERROR_INVALID_STATE;
- }
- return VC_ERROR_NONE;
- }
-
if (VC_ERROR_SERVICE_RESET == reason) {
SLOG(LOG_ERROR, TAG_VCC, "[ERROR] VC daemon reset");
}
}
- SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Error reason(%d), msg(%s)", reason, msg);
-
- vc_client_set_error(reason);
- ecore_main_loop_thread_safe_call_async(__vc_notify_error, NULL);
-
- return VC_ERROR_NONE;
-}
-
-int __vc_cb_error_to_app(int pid, int reason, const char* msg)
-{
- SLOG(LOG_INFO, TAG_VCC, "[INFO] send error to app(%d)", pid);
- SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Error reason(%d), msg(%s)", reason, msg);
+ SLOG(LOG_ERROR, TAG_VCC, "[INFO] send error to app(%d), error reason(%d), msg(%s)", pid, reason, msg);
vc_client_set_error(reason);
ecore_main_loop_thread_safe_call_async(__vc_notify_error, NULL);
static GList* g_tidl_infos = NULL;
-extern int __vc_cb_error(int reason, int daemon_pid, char* msg);
extern int __vc_cb_error_to_app(int pid, int reason, char* msg);
extern void __vc_cb_result();
extern int __vc_cb_service_state(int state);
__vc_cb_manager_pid(atoi(manager_pid));
}
} /* VCD_METHOD_SEND_MANAGER_PID */
- else if (0 == strncmp(VCD_METHOD_ERROR, method, strlen(VCD_METHOD_ERROR))) {
- /* signal!!! */
- char* reason = NULL;
- char* daemon_pid = NULL;
- char* err_msg = NULL;
-
- bundle_get_str(msg, VC_BUNDLE_REASON, &reason);
- bundle_get_str(msg, VC_BUNDLE_DAEMON_PID, &daemon_pid);
- bundle_get_str(msg, VC_BUNDLE_ERR_MSG, &err_msg);
-
- SLOG(LOG_DEBUG, TAG_VCC, "@@ vc Get Error message : reason(%d), daemon_pid(%d), msg(%s)", atoi(reason), atoi(daemon_pid), err_msg);
- __vc_cb_error(atoi(reason), atoi(daemon_pid), err_msg);
- } /* VCD_METHOD_ERROR */
else if (0 == strncmp(VCD_METHOD_ERROR_TO_APP, method, strlen(VCD_METHOD_ERROR_TO_APP))) {
/* signal!!! */
char* pid;