static int g_retry_connection_count = 0;
static Eina_Bool retry_connection(void* data)
{
+ MA_SLOGI("[ENTER]");
int ret = ma_dbus_request_hello();
if (ret == 0) {
- MA_SLOGD("Success to request hello. retry count(%d)", g_retry_connection_count);
+ MA_SLOGI("Success to request hello. retry count(%d)", g_retry_connection_count);
g_retry_connection_count = 0;
if (g_retry_connection_timer) ecore_timer_del(g_retry_connection_timer);
g_retry_connection_timer = NULL;
return ECORE_CALLBACK_RENEW;
}
+static void delete_retry_connection_timer(void* data)
+{
+ if (g_retry_connection_timer) {
+ ecore_timer_del(g_retry_connection_timer);
+ g_retry_connection_timer = NULL;
+ }
+}
+
+static void add_retry_connection_timer(void* data)
+{
+ delete_retry_connection_timer(NULL);
+
+ g_retry_connection_timer = ecore_timer_add(1.5f, retry_connection, NULL);
+ MA_SLOGI("Added timer for retry_connection : %p", g_retry_connection_timer);
+}
+
static void __start_prepare_func()
{
if (ECORE_CALLBACK_RENEW == retry_connection(NULL)) {
- ecore_timer_add(1.5f, retry_connection, NULL);
+ ecore_main_loop_thread_safe_call_async(add_retry_connection_timer, NULL);
}
}
MA_SLOGI("[Client DEBUG] Unprepare");
- if (g_retry_connection_timer) ecore_timer_del(g_retry_connection_timer);
- g_retry_connection_timer = NULL;
+ MA_SLOGD("Deleting timer for retry_connection");
+ ecore_main_loop_thread_safe_call_async(delete_retry_connection_timer, NULL);
ma_state_e state;
result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, 1000, &err);
if (dbus_error_is_set(&err)) {
- MA_SLOGE("[ERROR] Dbus Error (%s)", err.message); //LCOV_EXCL_LINE
+ MA_SLOGE("[ERROR] Dbus Error (%s) %p", err.message, result_msg); //LCOV_EXCL_LINE
dbus_error_free(&err);
}