From 65bc1642d04b6cbcf7331700460a84ffa78e67b4 Mon Sep 17 00:00:00 2001 From: Abhimanyu Swami Date: Fri, 31 Jan 2020 17:27:12 +0530 Subject: [PATCH] Fixed svace issues Change-Id: I229479207f3191cbe8d9fff753979b6721a6265b Signed-off-by: Abhimanyu Swami --- geofence-server/src/geofence_server.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/geofence-server/src/geofence_server.c b/geofence-server/src/geofence_server.c index 5cb8ea8..b0268ba 100644 --- a/geofence-server/src/geofence_server.c +++ b/geofence-server/src/geofence_server.c @@ -232,7 +232,7 @@ void bt_le_scan_result_display_cb(int result, bt_adapter_le_device_scan_result_i if (bt_info != NULL) { ret = bt_adapter_get_bonded_device_info(bt_info->bssid, &bt_device_info); if (ret == BT_ERROR_NONE) { - if (bt_device_info->is_connected == false) + if (bt_device_info != NULL && bt_device_info->is_connected == false) ble_proximity_mode = BLE_INFO_READ; } else if (ret == BT_ERROR_REMOTE_DEVICE_NOT_BONDED) { ble_proximity_mode = BLE_INFO_READ; /*Its not bonded*/ @@ -2223,7 +2223,10 @@ static void dbus_start_geofence_cb(gint fence_id, const gchar *app_id, gpointer if (rv != WIFI_MANAGER_ERROR_NONE) { LOGI_GEOFENCE("Fail to get the bssid: [%s]\n", __convert_wifi_error_to_string(rv)); } else { - bssidlen = strlen(ap_bssid); + if(ap_bssid != NULL) + bssidlen = strlen(ap_bssid); + else + bssidlen = 0; LOGI_GEOFENCE("Connected AP: %s, %d\n", ap_bssid, bssidlen); if (g_strcmp0(wifi_info->bssid, ap_bssid) == 0) { status_to_be_emitted = GEOFENCE_FENCE_STATE_IN; -- 2.7.4