Modified the signal handler for overlap connection/disconnection callback 24/97324/1 accepted/tizen/common/20161114.171547 accepted/tizen/ivi/20161114.074500 accepted/tizen/mobile/20161114.074402 accepted/tizen/tv/20161114.074424 accepted/tizen/wearable/20161114.074442 submit/tizen/20161114.043131
authorhyunuktak <hyunuk.tak@samsung.com>
Thu, 10 Nov 2016 00:47:54 +0000 (09:47 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Mon, 14 Nov 2016 01:37:58 +0000 (10:37 +0900)
Change-Id: I2f44aa2639ef67f10c52ec59bb15889397bcaf6e
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/capi-network-wifi-manager.spec
src/network_signal.c

index 86a94a9..1aed2c9 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          capi-network-wifi-manager
 Summary:       Network Wi-Fi library in TIZEN C API
-Version:       1.0.10
+Version:       1.0.11
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index 658fe34..1399da2 100755 (executable)
@@ -514,22 +514,6 @@ static int __net_handle_service_state_changed(const gchar *sig_path,
                const char *svc_name3 =
                                request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName;
 
-               if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag != TRUE &&
-                       request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag != TRUE &&
-                       request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag != TRUE) {
-                       /** Send Close Ind */
-                       event_data.Error = Error;
-                       event_data.Event =  NET_EVENT_CLOSE_IND;
-                       g_strlcpy(event_data.ProfileName, sig_path, NET_PROFILE_NAME_LEN_MAX+1);
-
-                       event_data.Datalength = 0;
-                       event_data.Data = NULL;
-
-                       WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_CLOSE_IND");
-
-                       _net_client_callback(&event_data);
-               }
-
                if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE &&
                                strstr(sig_path, svc_name2) != NULL) {
                        memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], 0,
@@ -548,6 +532,7 @@ static int __net_handle_service_state_changed(const gchar *sig_path,
                        _net_dbus_pending_call_unref();
 
                        _net_client_callback(&event_data);
+                       break;
                }
 
                if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE &&
@@ -567,6 +552,7 @@ static int __net_handle_service_state_changed(const gchar *sig_path,
                        _net_dbus_pending_call_unref();
 
                        _net_client_callback(&event_data);
+                       break;
                }
 
                if (request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE &&
@@ -587,7 +573,21 @@ static int __net_handle_service_state_changed(const gchar *sig_path,
                        _net_dbus_pending_call_unref();
 
                        _net_client_callback(&event_data);
+                       break;
                }
+
+               /** Send Close Ind */
+               event_data.Error = Error;
+               event_data.Event =  NET_EVENT_CLOSE_IND;
+               g_strlcpy(event_data.ProfileName, sig_path, NET_PROFILE_NAME_LEN_MAX+1);
+
+               event_data.Datalength = 0;
+               event_data.Data = NULL;
+
+               WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_CLOSE_IND");
+
+               _net_client_callback(&event_data);
+
                break;
        }
        case NET_STATE_TYPE_FAILURE: