[Internal: debug log add] debug log add
authorsanghyuk Ko <sanghyuk.ko@samsung.com>
Thu, 28 Mar 2013 02:03:25 +0000 (11:03 +0900)
committersanghyuk Ko <sanghyuk.ko@samsung.com>
Thu, 28 Mar 2013 02:03:25 +0000 (11:03 +0900)
[Problem]
-
[Cause]
-
[Solution]
- debug log add

Change-Id: Iff1775e821461df5b9a5a5707e8eaafb2faff7e3

src/framework/event/oma_ds_api.c

index af5e068..2e94ba3 100755 (executable)
@@ -467,12 +467,13 @@ static int _launch_omads_agent(void)
 
        DBusGConnection *connection = NULL;
        DBusGProxy *dbus_proxy = NULL;
+       gboolean bResult = FALSE;
 
        g_type_init();
 
        connection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
        if (error != NULL) {
-               _DEBUG_ERROR("Connecting to system bus failed: %s\n", error->message);
+               _DEBUG_ERROR("dbus_g_bus_get failed: %s\n", error->message);
                g_error_free(error);
                _INNER_FUNC_EXIT;
                return -1;
@@ -484,7 +485,17 @@ static int _launch_omads_agent(void)
        _DEBUG_INFO("dbus_proxy %x", dbus_proxy);
 
        //dbus_g_proxy_call_no_reply(dbus_proxy, "Hello_Agent", G_TYPE_INVALID);
-       dbus_g_proxy_call(dbus_proxy, "Hello_Agent", &error, G_TYPE_INVALID, G_TYPE_INVALID);
+       bResult = dbus_g_proxy_call(dbus_proxy, "Hello_Agent", &error, G_TYPE_INVALID, G_TYPE_INVALID);
+
+       if (bResult == FALSE) {
+               _DEBUG_ERROR("dbus_g_proxy_call failed: %s\n", error->message);
+               g_error_free(error);
+               g_object_unref(dbus_proxy);
+               dbus_g_connection_unref(connection);
+
+               _INNER_FUNC_EXIT;
+               return -1;
+       }
 
        g_object_unref(dbus_proxy);
        dbus_g_connection_unref(connection);
@@ -513,7 +524,7 @@ static int _kill_omads_agent(void)
 
        connection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
        if (error != NULL) {
-               _DEBUG_ERROR("Connecting to system bus failed: %s\n", error->message);
+               _DEBUG_ERROR("dbus_g_bus_get failed: %s\n", error->message);
                g_error_free(error);
                _INNER_FUNC_EXIT;
                return -1;