[my-place] Forgotten data to detected places database add.
[platform/core/context/context-provider.git] / src / my-place / place / PlacesDetector.cpp
index 5ecd6eb..03fd1d5 100644 (file)
@@ -253,9 +253,17 @@ std::shared_ptr<ctx::Place> ctx::PlacesDetector::__placeFromMergedVisits(Visits
        }
        std::shared_ptr<MacSet> allMacs = macSetsUnion(macSets);
        __mergeLocation(mergedVisits, *place);
-
        PlaceCateger::categorize(mergedVisits, *place);
 
+       /*
+        * At this stage getting network names associated with Wifi AP MAC addresses is not needed (by looking
+        * to Wifi APs MAC addresses to network names map in database). This additional information for place
+        * is needed only when place is returned for external clients (getting straight from the database).
+        */
+       for (ctx::Mac mac : *allMacs) {
+               place->wifiAps.insert(std::pair<std::string, std::string>(mac, ""));
+       }
+
        return place;
 }