Fix SAT dbus API isn't setup issue 13/14313/1
authorCaiwen Zhang <caiwen.zhang@intel.com>
Mon, 5 Aug 2013 20:01:48 +0000 (04:01 +0800)
committerCaiwen Zhang <caiwen.zhang@intel.com>
Fri, 3 Jan 2014 13:56:22 +0000 (21:56 +0800)
After core objects are initialized, dbus interfaces will be set up. it is
quite possible sim status is still unknown at this moment. If sim status
is unknown, SAT dbus interface will not be set up.

Currently, telephony doesn't support dynamic add and remove core object,
simply, remove sim satus checking.

Change-Id: I39ad1cb8129e9f5c284a8beee00882adebff2e55
Signed-off-by: Caiwen Zhang <caiwen.zhang@intel.com>
src/desc-dbus.c

index e4a6da4ae391f6af93682a903ab51fff8f906f26..20181ac228e344571ddba36f22c867b3be554dc3 100644 (file)
@@ -62,7 +62,6 @@ static void set_telephony_ready(Server *server)
 static void add_modem(struct custom_data *ctx, TcorePlugin *p)
 {
        TelephonyObjectSkeleton *object;
-       CoreObject *co_sim;
        char *path = NULL;
        const char *cp_name;
        dbg("Entry");
@@ -114,14 +113,12 @@ static void add_modem(struct custom_data *ctx, TcorePlugin *p)
                dbus_plugin_setup_sms_interface(object, ctx);
 
        /* SIM */
-       co_sim = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SIM);
-       if (co_sim != NULL)
+       if (tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SIM) != NULL)
                dbus_plugin_setup_sim_interface(object, ctx);
 
        /* SAT */
-       if ((co_sim != NULL) && (tcore_sim_get_status(co_sim) >= SIM_STATUS_INITIALIZING))
-               if (tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SAT) != NULL)
-                       dbus_plugin_setup_sat_interface(object, ctx);
+       if (tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_SAT) != NULL)
+               dbus_plugin_setup_sat_interface(object, ctx);
 
        /* PHONEBOOK */
        if (tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_PHONEBOOK) != NULL)