Changed order of dbus signal to subscribe signal correctly 28/94328/1 accepted/tizen/common/20161102.121517 accepted/tizen/ivi/20161102.072335 accepted/tizen/mobile/20161102.072235 accepted/tizen/wearable/20161102.072309 submit/tizen/20161101.065543
authorSeonah Moon <seonah1.moon@samsung.com>
Fri, 28 Oct 2016 08:24:52 +0000 (17:24 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Fri, 28 Oct 2016 08:25:15 +0000 (17:25 +0900)
Change-Id: Ib22b9d36d810033058571726089f798d8166a3df
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
packaging/capi-network-softap.spec
src/softap.c

index 49d69e42473d061429628d1f85b3365e64a9041f..50417b1690a80732570e2edc2d347395bad8b81b 100644 (file)
@@ -1,6 +1,6 @@
 Name:          capi-network-softap
 Summary:       Softap Framework
-Version:       0.0.9
+Version:       0.0.10
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index c2ae05e2c05ca583c010e96735314939101efbb4..90b28006c8ada6b4595f0658a3061c0d67054e12 100755 (executable)
@@ -64,14 +64,14 @@ static void __handle_dhcp(GDBusConnection *connection, const gchar *sender_name,
                GVariant *parameters, gpointer user_data);
 
 static __softap_sig_t sigs[] = {
+       {0, SIGNAL_NAME_SOFTAP_ON, __handle_softap_on},
+       {0, SIGNAL_NAME_SOFTAP_OFF, __handle_softap_off},
        {0, SIGNAL_NAME_LOW_BATTERY_MODE, __handle_low_battery_mode},
        {0, SIGNAL_NAME_FLIGHT_MODE, __handle_flight_mode},
        {0, SIGNAL_NAME_SECURITY_TYPE_CHANGED, __handle_security_type_changed},
        {0, SIGNAL_NAME_SSID_VISIBILITY_CHANGED, __handle_ssid_visibility_changed},
        {0, SIGNAL_NAME_PASSPHRASE_CHANGED, __handle_passphrase_changed},
        {0, SIGNAL_NAME_DHCP_STATUS, __handle_dhcp},
-       {0, SIGNAL_NAME_SOFTAP_ON, __handle_softap_on},
-       {0, SIGNAL_NAME_SOFTAP_OFF, __handle_softap_off},
        {0, "", NULL} };
 
 static int retry = 0;
@@ -523,8 +523,6 @@ static void __enabled_cfm_cb(GObject *source_object, GAsyncResult *res,
                        SOFTAP_SERVICE_OBJECT_PATH, NULL, G_DBUS_SIGNAL_FLAGS_NONE,
                        sigs[E_SIGNAL_SOFTAP_ON].cb, (gpointer)sa, NULL);
 
-       DBG("[DBG] sig.id for softap on (%d)", sigs[E_SIGNAL_SOFTAP_ON].sig_id);
-
        if (ecb)
                ecb(error, true, data);
 
@@ -817,6 +815,7 @@ API int softap_enable(softap_h softap)
         softap_error_e ret = SOFTAP_ERROR_NONE;
         __softap_h *sa = (__softap_h *) softap;
         GDBusProxy *proxy = sa->client_bus_proxy;
+        GDBusConnection *connection = sa->client_bus;
 
         g_dbus_proxy_set_default_timeout(proxy, DBUS_TIMEOUT_INFINITE);
 
@@ -828,7 +827,7 @@ API int softap_enable(softap_h softap)
                return SOFTAP_ERROR_OPERATION_FAILED;
        }
 
-       g_dbus_connection_signal_unsubscribe(sa->client_bus, sigs[E_SIGNAL_SOFTAP_ON].sig_id);
+       g_dbus_connection_signal_unsubscribe(connection, sigs[E_SIGNAL_SOFTAP_ON].sig_id);
 
        g_dbus_proxy_call(proxy, "enable",
        g_variant_new("(ssii)", set.ssid, set.key, set.visibility, set.sec_type),