int sttdc_send_error_signal(int uid, int reason, const char *err_msg)
{
- if (NULL == err_msg) {
- SLOG(LOG_ERROR, TAG_STTD, "[Dbus ERROR] Input parameter is NULL");
- return STTD_ERROR_INVALID_PARAMETER;
- }
-
int pid = sttd_client_get_pid(uid);
if (0 > pid) {
SLOG(LOG_ERROR, TAG_STTD, "[Dbus ERROR] pid is NOT valid");
{
if (NULL != g_conn_listener) {
dbus_connection_close(g_conn_listener);
- dbus_connection_unref(g_conn_listener);
g_conn_listener = NULL;
}
if (NULL != g_conn_sender) {
dbus_connection_close(g_conn_sender);
- dbus_connection_unref(g_conn_sender);
g_conn_sender = NULL;
}
if (NULL != g_conn_custom) {
dbus_connection_close(g_conn_custom);
- dbus_connection_unref(g_conn_custom);
g_conn_custom = NULL;
}
}
__sttd_dbus_service_free();
- if (NULL == engine_appid || NULL == engine_default || 0 == strncmp(engine_appid, engine_default, strlen(engine_appid))) {
+ if (NULL == engine_default || 0 == strncmp(engine_appid, engine_default, strlen(engine_appid))) {
g_server_service_name = (char*)calloc(strlen(STT_SERVER_SERVICE_NAME) + 1, sizeof(char));
if (g_server_service_name)
snprintf(g_server_service_name, strlen(STT_SERVER_SERVICE_NAME) + 1, "%s", STT_SERVER_SERVICE_NAME);
}
dbus_connection_close(g_conn_custom);
- dbus_connection_unref(g_conn_custom);
g_conn_custom = NULL;
SLOG(LOG_DEBUG, TAG_STTD, "==");