if (1 != dbus_connection_send(g_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_VCC, "[Dbus ERROR] Fail to Send"); //LCOV_EXCL_LINE
+ dbus_message_unref(msg);
return VC_ERROR_OPERATION_FAILED;
}
if (1 != dbus_connection_send(g_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_VCC, "[Dbus ERROR] Fail to Send"); //LCOV_EXCL_LINE
+ dbus_message_unref(msg);
return VC_ERROR_OPERATION_FAILED;
}
if (1 != dbus_connection_send(g_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_VCC, "[Dbus ERROR] Fail to Send"); //LCOV_EXCL_LINE
+ dbus_message_unref(msg);
return VC_ERROR_OPERATION_FAILED;
} else {
SLOG(LOG_DEBUG, TAG_VCC, "[Dbus DEBUG] Success to Send");
SLOG(LOG_DEBUG, TAG_VCM, "@@@");
- } /* VCD_MANAGER_METHOD_ALL_RESULT */
+ } /* VCD_MANAGER_METHOD_DIALOG */
else if (dbus_message_is_signal(msg, if_name, VCD_MANAGER_METHOD_ERROR)) {
SLOG(LOG_INFO, TAG_VCM, "@@@ Get Error");
else if (dbus_message_is_method_call(msg, if_name, VCD_MANAGER_METHOD_SET_PRIVATE_DATA)) {
SLOG(LOG_DEBUG, TAG_VCM, "@@@ Get request set private data");
int pid = 0;
- int ret = -1;
char* key = NULL;
char* private_data = NULL;
if (pid > 0) {
SLOG(LOG_DEBUG, TAG_VCM, "@@ vc mgr get request set private data : pid(%d) ", pid);
- ret = __vc_mgr_cb_private_data_set(key, private_data);
+ __vc_mgr_cb_private_data_set(key, private_data);
} else {
SLOG(LOG_ERROR, TAG_VCM, "@@ vc mgr get request set private data : invalid pid ");
}
- DBusMessage *reply = NULL;
- reply = dbus_message_new_method_return(msg);
-
- if (NULL != reply) {
- dbus_message_append_args(reply, DBUS_TYPE_INT32, &ret, DBUS_TYPE_INVALID);
-
- if (!dbus_connection_send(g_m_conn_listener, reply, NULL))
- SLOG(LOG_ERROR, TAG_VCM, "@@ vc get request set private data : fail to send reply");
- else
- SLOG(LOG_DEBUG, TAG_VCM, "@@ vc get request set private data : result(%d)", ret);
-
- dbus_connection_flush(g_m_conn_listener);
- dbus_message_unref(reply);
- } else {
- SLOG(LOG_ERROR, TAG_VCM, "@@ vc mgr get request set private data : fail to create reply message");
- }
-
SLOG(LOG_DEBUG, TAG_VCM, "@@@");
} /* VCD_MANAGER_METHOD_SET_PRIVATE_DATA */
if (1 != dbus_connection_send(g_m_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_VCM, "[Dbus ERROR] Fail to Send");
+ dbus_message_unref(msg);
return -1;
} else {
SLOG(LOG_DEBUG, TAG_VCM, "[Dbus] SUCCESS Send");
dbus_connection_flush(g_m_conn_sender);
}
+ dbus_message_unref(msg);
return 0;
}
if (1 != dbus_connection_send(g_m_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_VCM, "[Dbus ERROR] Fail to Send");
+ dbus_message_unref(msg);
return -1;
} else {
SLOG(LOG_DEBUG, TAG_VCM, "[Dbus] SUCCESS Send");
dbus_connection_flush(g_m_conn_sender);
}
+ dbus_message_unref(msg);
return 0;
}
if (1 != dbus_connection_send(g_m_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_VCM, "[Dbus ERROR] Fail to Send");
+ dbus_message_unref(msg);
return -1;
} else {
SLOG(LOG_DEBUG, TAG_VCM, "[Dbus] SUCCESS Send");
dbus_connection_flush(g_m_conn_sender);
}
+ dbus_message_unref(msg);
return 0;
}
__vc_widget_cb_result();
- /*
- reply = dbus_message_new_method_return(msg);
-
- if (NULL != reply) {
- if (!dbus_connection_send(g_w_conn_listener, reply, NULL))
- SLOG(LOG_ERROR, TAG_VCW, "@@ vc widget get result : fail to send reply");
- else
- SLOG(LOG_DEBUG, TAG_VCW, "@@ vc widget get result");
-
- dbus_connection_flush(g_w_conn_listener);
- dbus_message_unref(reply);
- } else {
- SLOG(LOG_ERROR, TAG_VCW, "@@ vc widget get result : fail to create reply message");
-
- */
-
SLOG(LOG_DEBUG, TAG_VCW, "@@@");
} /* VCD_WIDGET_METHOD_RESULT */
if (1 != dbus_connection_send(g_w_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_VCW, "[Dbus ERROR] Fail to Send");
+ dbus_message_unref(msg);
return VC_ERROR_OPERATION_FAILED;
}
if (1 != dbus_connection_send(g_w_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_VCW, "[Dbus ERROR] Fail to Send");
+ dbus_message_unref(msg);
return VC_ERROR_OPERATION_FAILED;
}
} else {
SLOG(LOG_DEBUG, TAG_VCD, "[IN] vcd mgr set domain : pid(%d), key(%s), data(%s)", pid, key, data);
ret = vcd_server_mgr_set_private_data(pid, key, data);
- }
-
- DBusMessage* reply;
- reply = dbus_message_new_method_return(msg);
-
- if (NULL != reply) {
- dbus_message_append_args(reply, DBUS_TYPE_INT32, &ret, DBUS_TYPE_INVALID);
-
- if (0 == ret) {
- SLOG(LOG_DEBUG, TAG_VCD, "[OUT SUCCESS] Result(%d)", ret);
- } else {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Result(%d)", ret);
+ if (0 != ret) {
+ SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to set private data");
}
-
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
- } else {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Fail to create reply message!!");
}
SLOG(LOG_DEBUG, TAG_VCD, "@@@");
} else {
SLOG(LOG_DEBUG, TAG_VCD, "[IN] vcd mgr request to do action : pid(%d), type(%d) send_event(%s)", pid, type, send_event);
ret = vcd_server_mgr_do_action(pid, type, send_event);
- }
-
- DBusMessage* reply;
- reply = dbus_message_new_method_return(msg);
-
- if (NULL != reply) {
- dbus_message_append_args(reply, DBUS_TYPE_INT32, &ret, DBUS_TYPE_INVALID);
-
- if (0 == ret) {
- SLOG(LOG_DEBUG, TAG_VCD, "[OUT SUCCESS] Result(%d)", ret);
- } else {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Result(%d)", ret);
+ if (0 != ret) {
+ SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to do action");
}
-
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
- } else {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Fail to create reply message!!");
}
SLOG(LOG_DEBUG, TAG_VCD, "@@@");
vcd_server_mgr_result_select();
}
return 0;
-
- /*
- DBusMessage* reply;
- reply = dbus_message_new_method_return(msg);
-
- if (NULL != reply) {
- dbus_message_append_args(reply, DBUS_TYPE_INT32, &ret, DBUS_TYPE_INVALID);
-
- if (0 == ret) {
- SLOG(LOG_DEBUG, TAG_VCD, "[OUT SUCCESS] Result(%d)", ret);
- } else {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Result(%d)", ret);
- }
-
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
- } else {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Fail to create reply message!!");
- }
-
- SLOG(LOG_DEBUG, TAG_VCD, "@@@");
-
- return 0;
- */
}
/* for TTS feedback */
} else {
SLOG(LOG_DEBUG, TAG_VCD, "[IN] vcd dialog : pid(%d), disp_text(%s), utt_text(%s), continuous(%d)", pid, disp_text, utt_text, continuous);
ret = vcd_server_dialog(pid, disp_text, utt_text, continuous);
- }
-
- DBusMessage* reply;
- reply = dbus_message_new_method_return(msg);
-
- if (NULL != reply) {
- if (0 == ret) {
- /* Append result and language */
- dbus_message_append_args(reply, DBUS_TYPE_INT32, &ret, DBUS_TYPE_INVALID);
-
- SLOG(LOG_DEBUG, TAG_VCD, "[OUT SUCCESS] Result(%d)", ret);
- } else {
- dbus_message_append_args(reply, DBUS_TYPE_INT32, &ret, DBUS_TYPE_INVALID);
-
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Result(%d)", ret);
- }
-
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Out Of Memory!");
+ if (0 != ret) {
+ SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to dialog");
}
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
- } else {
- SLOG(LOG_ERROR, TAG_VCD, "[OUT ERROR] Fail to create reply message!!");
}
-
SLOG(LOG_DEBUG, TAG_VCD, "@@@");
return 0;