fixed SVACE 2.2 issues 67/101867/1 accepted/tizen/common/20161202.233430 accepted/tizen/ivi/20161205.001013 accepted/tizen/mobile/20161205.001007 submit/tizen/20161202.095236
authorjomui <jongmun.woo@samsung.com>
Fri, 2 Dec 2016 09:02:30 +0000 (18:02 +0900)
committerjomui <jongmun.woo@samsung.com>
Fri, 2 Dec 2016 09:02:50 +0000 (18:02 +0900)
Signed-off-by: jomui <jongmun.woo@samsung.com>
Change-Id: Ibebe3807b07bccbb2697935c4392a50966610fa4

geofence-server/src/geofence_server.c
geofence-server/src/geofence_server_wifi.c

index 9b33a97..88fbf87 100644 (file)
@@ -2215,7 +2215,7 @@ static void dbus_start_geofence_cb(gint fence_id, const gchar *app_id, gpointer
                                } else {
                                        bssidlen = strlen(ap_bssid);
                                        LOGI_GEOFENCE("Connected AP: %s, %d\n", ap_bssid, bssidlen);
-                                       if (g_strcmp0(wifi_info->bssid, ap_bssid) == 0) {
+                                       if (g_strcmp0(wifi_info->bssid, ap_bssid) == 0) {
                                                status_to_be_emitted = GEOFENCE_FENCE_STATE_IN;
                                                geofence_server->connectedTrackingWifiFenceId = fence_id;
                                        } else {
@@ -2223,6 +2223,9 @@ static void dbus_start_geofence_cb(gint fence_id, const gchar *app_id, gpointer
                                        }
 
                                }
+                               if (ap_bssid != NULL)
+                                       free(ap_bssid);
+                               ap_bssid = NULL;
                        }
                } else {
                        LOGI_GEOFENCE("Wifi is not switched on...");
index 3217474..13fc92f 100644 (file)
@@ -165,6 +165,9 @@ void wifi_rssi_level_changed(wifi_rssi_level_e rssi_level, void *user_data)
                                state = GEOFENCE_PROXIMITY_FAR;
                        emit_wifi_geofence_proximity_changed(geofence_server, geofence_server->connectedTrackingWifiFenceId, state);
                }
+               if (bssid != NULL)
+                       free(bssid);
+               bssid = NULL;
        }
 }
 
@@ -203,7 +206,7 @@ void wifi_device_state_changed(wifi_device_state_e state, void *user_data)
        LOGD_GEOFENCE("exit");
 }
 
-void __geofence_check_wifi_matched_bssid(wifi_connection_state_e state,        char *bssid, void *user_data)
+void __geofence_check_wifi_matched_bssid(wifi_connection_state_e state, char *bssid, void *user_data)
 {
        LOGD_GEOFENCE("Comparing the matching bssids");
        GeofenceServer *geofence_server = (GeofenceServer *)user_data;
@@ -263,4 +266,7 @@ void wifi_conn_state_changed(wifi_connection_state_e state, wifi_ap_h ap, void *
                LOGD_GEOFENCE("Wifi disconnected with [%s].", ap_bssid);
                __geofence_check_wifi_matched_bssid(state, ap_bssid, user_data);
        }
+       if (ap_bssid != NULL)
+               free(ap_bssid);
+       ap_bssid = NULL;
 }