{
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 (TTS_MODE_DEFAULT == client->mode) {
msg = dbus_message_new_method_call(
- TTS_SERVER_SERVICE_NAME,
- TTS_SERVER_SERVICE_OBJECT_PATH,
- TTS_SERVER_SERVICE_INTERFACE,
+ TTS_SERVER_SERVICE_NAME,
+ TTS_SERVER_SERVICE_OBJECT_PATH,
+ TTS_SERVER_SERVICE_INTERFACE,
method);
} else if (TTS_MODE_NOTIFICATION == client->mode) {
msg = dbus_message_new_method_call(
- TTS_NOTI_SERVER_SERVICE_NAME,
- TTS_NOTI_SERVER_SERVICE_OBJECT_PATH,
- TTS_NOTI_SERVER_SERVICE_INTERFACE,
+ TTS_NOTI_SERVER_SERVICE_NAME,
+ TTS_NOTI_SERVER_SERVICE_OBJECT_PATH,
+ TTS_NOTI_SERVER_SERVICE_INTERFACE,
method);
} else if (TTS_MODE_SCREEN_READER == client->mode) {
msg = dbus_message_new_method_call(
- TTS_SR_SERVER_SERVICE_NAME,
- TTS_SR_SERVER_SERVICE_OBJECT_PATH,
- TTS_SR_SERVER_SERVICE_INTERFACE,
+ TTS_SR_SERVER_SERVICE_NAME,
+ TTS_SR_SERVER_SERVICE_OBJECT_PATH,
+ TTS_SR_SERVER_SERVICE_INTERFACE,
method);
} else if (TTS_MODE_INTERRUPT == client->mode) {
msg = dbus_message_new_method_call(
- TTS_INTERRUPT_SERVER_SERVICE_NAME,
- TTS_INTERRUPT_SERVER_SERVICE_OBJECT_PATH,
- TTS_INTERRUPT_SERVER_SERVICE_INTERFACE,
+ TTS_INTERRUPT_SERVER_SERVICE_NAME,
+ TTS_INTERRUPT_SERVER_SERVICE_OBJECT_PATH,
+ TTS_INTERRUPT_SERVER_SERVICE_INTERFACE,
method);
} else {
SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Input mode is not available");
/* create a message & check for errors */
msg = dbus_message_new_method_call(
- service_name,
- TTS_CLIENT_SERVICE_OBJECT_PATH,
- target_if_name,
+ service_name,
+ TTS_CLIENT_SERVICE_OBJECT_PATH,
+ target_if_name,
TTSD_METHOD_HELLO);
if (NULL == msg) {
{
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;
}
}