dbus_connection_flush(g_conn_listener);
dbus_message_unref(reply);
+ reply = NULL;
} else {
SLOG(LOG_ERROR, TAG_STTC, ">>>> stt get hello : fail to create reply message");
}
else {
SLOG(LOG_DEBUG, TAG_STTC, "Message is NOT valid");
dbus_message_unref(msg);
+ msg = NULL;
break;
}
/* free the message */
dbus_message_unref(msg);
+ msg = NULL;
} /* while */
return ECORE_CALLBACK_RENEW;
if (g_conn_sender) {
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_short_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Get arguments error (%s)", err.message);
dbus_error_free(&err);
if (NULL != result_msg) {
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
if (g_conn_sender) {
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
stt_client_s* client = stt_client_get_by_uid(uid);
if (NULL == client) {
SLOG(LOG_ERROR, TAG_STTC, "Fail to get STT client");
+ dbus_message_unref(result_msg);
+ result_msg = NULL;
return STT_ERROR_OPERATION_FAILED;
}
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_STTC, "Match Error (%s)", err.message);
dbus_error_free(&err);
+ dbus_message_unref(result_msg);
+ result_msg = NULL;
return STT_ERROR_OPERATION_FAILED;
}
}
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
} else {
SLOG(LOG_ERROR, TAG_STTC, "<<<< Result message is NULL"); //LCOV_EXCL_LINE
stt_dbus_reconnect();
result = STT_ERROR_OPERATION_FAILED;
}
+ if (msg != NULL) {
+ dbus_message_unref(msg);
+ msg = NULL;
+ }
+
return result;
}
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_short_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt finalize : result = %d", result);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt set engine : result = %d , silence(%d), credential(%d)",
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
*value = (bool)available;
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
}
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
} else {
SLOG(LOG_ERROR, TAG_STTC, "<<<< stt get support languages : result message is NULL");
stt_dbus_reconnect();
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
dbus_error_free(&err);
result = STT_ERROR_OPERATION_FAILED;
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
*language = strdup(temp_lang);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
//LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt set private data : result = %d", result);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
//LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt get private data : result = %d", result);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
//LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
*support = (bool)result_support;
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
//LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt set start sound : result = %d", result);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
//LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt unset start sound : result = %d", result);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
//LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt set stop sound : result = %d", result);
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
dbus_message_unref(msg);
+ msg = NULL;
if (dbus_error_is_set(&err)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Send Error (%s)", err.message);
//LCOV_EXCL_STOP
}
dbus_message_unref(result_msg);
+ result_msg = NULL;
if (0 == result) {
SLOG(LOG_DEBUG, TAG_STTC, "<<<< stt unset stop sound : result = %d", result);
free(temp);
temp = NULL;
}
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OUT_OF_MEMORY;
//LCOV_EXCL_STOP
} else {
}
dbus_message_unref(msg);
+ msg = NULL;
} else {
SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender); //LCOV_EXCL_LINE
free(temp);
temp = NULL;
}
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OPERATION_FAILED;
}
if (!dbus_connection_send(g_conn_sender, msg, NULL)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[Dbus ERROR] <<<< stt stop message : Out Of Memory !");
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OUT_OF_MEMORY;
//LCOV_EXCL_STOP
} else {
}
dbus_message_unref(msg);
+ msg = NULL;
} else {
SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender);
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OPERATION_FAILED;
}
if (!dbus_connection_send(g_conn_sender, msg, NULL)) {
//LCOV_EXCL_START
SLOG(LOG_ERROR, TAG_STTC, "[Dbus ERROR] <<<< stt stop message : Out Of Memory !");
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OUT_OF_MEMORY;
//LCOV_EXCL_STOP
} else {
}
dbus_message_unref(msg);
+ msg = NULL;
} else {
SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender);
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OPERATION_FAILED;
}
free(temp);
temp = NULL;
}
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OUT_OF_MEMORY;
} else {
dbus_connection_flush(g_conn_sender);
}
dbus_message_unref(msg);
-
+ msg = NULL;
} else {
SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender);
if (NULL != temp) {
free(temp);
temp = NULL;
}
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OPERATION_FAILED;
}
if (!dbus_connection_send(g_conn_sender, msg, NULL)) {
SLOG(LOG_ERROR, TAG_STTC, "[Dbus ERROR] <<<< stt stop message : Out Of Memory !");
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OUT_OF_MEMORY;
} else {
dbus_connection_flush(g_conn_sender);
}
dbus_message_unref(msg);
+ msg = NULL;
} else {
SLOG(LOG_WARN, TAG_STTC, "[WARN] dbus connection handle is null (%p)", g_conn_sender);
+ dbus_message_unref(msg);
+ msg = NULL;
return STT_ERROR_OPERATION_FAILED;
}