shill: process BSSAdded and BSSRemoved signals in deferred tasks
Because the handlers for these signals may invoke D-Bus
methods, they need to be executed as deferred tasks.
BUG=chromium-os:23833
TEST=manual
Manual testing:
- ran shill 3 times on alex w/o the patch, found it crashed reliably
(100%) in the BSSAdded handler.
- ran shill 5 times on alex w/the patch, found it did not crash.
Change-Id: I83f2d3bb1c99389501cd93e7138c3eb9cd273011
Reviewed-on: https://gerrit.chromium.org/gerrit/12528
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
diff --git a/wifi.h b/wifi.h
index a1fbd7d..c3c498a 100644
--- a/wifi.h
+++ b/wifi.h
@@ -92,6 +92,9 @@
// Create services for hidden networks stored in |storage|. Returns true
// if any were found, otherwise returns false.
bool LoadHiddenServices(StoreInterface *storage);
+ void BSSAddedTask(const ::DBus::Path &BSS,
+ const std::map<std::string, ::DBus::Variant> &properties);
+ void BSSRemovedTask(const ::DBus::Path &BSS);
void PropertiesChangedTask(
const std::map<std::string, ::DBus::Variant> &properties);
void ScanDoneTask();