done:
wifi_location_detection_type |= detection_type;
- UA_WIFI_LOCATION_INFO_C("wifi_location_detection_type = 0x%8.8X", wifi_location_detection_type);
+ UA_WIFI_LOCATION_INFO_C("wifi_location_detection_type = 0x%8.8X",
+ wifi_location_detection_type);
FUNC_EXIT;
return ret;
if (!wifi_location_info)
return;
- if (wifi_location_info->presence_reported)
- return;
-
dev_info = _wifi_location_plugin_util_get_dev_info_from_wifi_location_info(
wifi_location_info);
if (!dev_info) {
dev_info->last_seen = _wifi_location_plugin_util_get_curr_time();
if (uas_cbs && uas_cbs->device_detected_cb) {
- uas_cbs->device_detected_cb(PLUGIN_ID, UAS_PRESENCE, dev_info);
- wifi_location_info->presence_reported = TRUE;
+ /*Report location */
+ uas_cbs->device_detected_cb(PLUGIN_ID, UAS_LOCATION, dev_info);
+
+ /*Report presence */
+ if (!(wifi_location_info->presence_reported)) {
+ uas_cbs->device_detected_cb(PLUGIN_ID, UAS_PRESENCE, dev_info);
+ wifi_location_info->presence_reported = TRUE;
+ }
} else {
UA_WIFI_LOCATION_ERR("uas_cbs not ready");
}
GSList *l;
- ret_if(!(UAS_PRESENCE & wifi_location_detection_type));
+ ret_if(!((UAS_PRESENCE | UAS_LOCATION) & wifi_location_detection_type));
for (l = dev_list; NULL != l; l = g_slist_next(l)) {
uas_wifi_location_info_t *wifi_location_info = l->data;