In SDK, sometimes, tel_init fails on msg-server when boot up
authorDongchul Lim <dc7.lim@samsung.com>
Mon, 8 Apr 2013 13:04:31 +0000 (22:04 +0900)
committerDongchul Lim <dc7.lim@samsung.com>
Mon, 8 Apr 2013 13:09:39 +0000 (22:09 +0900)
Due to above, sms/mms couldn't make send successfully

Change-Id: I724ed86963c9b93c225e0d9b7a02c43c6d7391d7

src/desc-dbus.c

index b165709b04d555d87de996a55d46b254f3feee81..6169ced1c0f3f0107fd63e716994d4d1eb22658d 100644 (file)
@@ -396,12 +396,26 @@ on_manager_getmodems (TelephonyManager *mgr,
        return TRUE;
 }
 
+static gboolean _set_telephony_ready(gpointer data)
+{
+       struct custom_data *ctx = data;
+       static Storage *strg;
+       gboolean rv;
+
+       strg = tcore_server_find_storage(ctx->server, "vconf");
+       rv = tcore_storage_set_bool(strg, STORAGE_KEY_TELEPHONY_READY, TRUE);
+       if(rv == FALSE){
+               err("Set Telephony Ready (TRUE) to registry - FAIL");
+       } else {
+               dbg("Set Telephony Ready (TRUE) to registry - SUCCESS");
+       }
+       return FALSE;
+}
+
 static void on_bus_acquired(GDBusConnection *conn, const gchar *name, gpointer user_data)
 {
        struct custom_data *ctx = user_data;
        TelephonyManager *mgr;
-       static Storage *strg;
-       gboolean rv;
 
        info("DBUS Registered");
 
@@ -418,20 +432,11 @@ static void on_bus_acquired(GDBusConnection *conn, const gchar *name, gpointer u
 
        dbg("Aquire DBUS - COMPLETE");
 
-       /* Set Telephony Ready registry
-        *
-        * At this point we can convey upper Layer that Telephony is Ready.
-        */
-       strg = tcore_server_find_storage(ctx->server, "vconf");
-       rv = tcore_storage_set_bool(strg, STORAGE_KEY_TELEPHONY_READY, TRUE);
-       if(rv == FALSE){
-               err("Set Telephony Ready (TRUE) to registry - FAIL");
-       } else {
-               dbg("Set Telephony Ready (TRUE) to registry - SUCCESS");
-       }
-
        /* Refresh Object */
        refresh_object(ctx);
+
+       /* Telephony ready vconf key set in idle */
+       g_idle_add(_set_telephony_ready, ctx);
 }
 
 struct tcore_communitor_operations ops = {