From f5951b5f047087a3a7432c047fd54e0243890284 Mon Sep 17 00:00:00 2001 From: Marcin Masternak Date: Fri, 28 Oct 2016 17:13:32 +0200 Subject: [PATCH] [my-place] Forgotten data to detected places database add. Change-Id: I6df5a35b1ea04c4d820bd04460bc0b668749e6ad Signed-off-by: Marcin Masternak --- src/my-place/facade/UserPlaces.cpp | 1 + src/my-place/place/PlacesDetector.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/my-place/facade/UserPlaces.cpp b/src/my-place/facade/UserPlaces.cpp index e989ab7..01b0683 100755 --- a/src/my-place/facade/UserPlaces.cpp +++ b/src/my-place/facade/UserPlaces.cpp @@ -108,6 +108,7 @@ ctx::Json ctx::UserPlaces::__composeJson(std::vector> pla placeJson.set(NULL, PLACE_CREATE_DATE, static_cast(place->createDate)); data.append(NULL, PLACE_DATA_READ, placeJson); } + _J("returns ", data); return data; } diff --git a/src/my-place/place/PlacesDetector.cpp b/src/my-place/place/PlacesDetector.cpp index 5ecd6eb..03fd1d5 100644 --- a/src/my-place/place/PlacesDetector.cpp +++ b/src/my-place/place/PlacesDetector.cpp @@ -253,9 +253,17 @@ std::shared_ptr ctx::PlacesDetector::__placeFromMergedVisits(Visits } std::shared_ptr 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(mac, "")); + } + return place; } -- 2.7.4