aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguoyin.chen <guoyin.chen@freescale.com>2016-05-06 16:20:33 +0800
committerMohammed Habibulla <moch@google.com>2016-05-06 22:57:32 +0000
commite477f1e5fd82dfcb545b9f57b98b0d3384ac75de (patch)
tree2948b91552ee7cf083f0de1ca958e427843969ea
parentc641b5117d9667751ba6f650176adfdcb12ce077 (diff)
downloadweaved-e477f1e5fd82dfcb545b9f57b98b0d3384ac75de.tar.gz
There are two net interfaces wlan0 and eth0 for the picoimx board. When trying to register the board to cloud through weave manger, The weaved will have below segment fault. The root cause is after wlan0 claimed from shill, there will be only eth0 been hold in device__. And there is no related selected_service_ been set for the eth0 backtrace: 00 pc 000225de /system/bin/weaved 01 pc 0002247d /system/bin/weaved 02 pc 00022699 /system/bin/weaved 03 pc 0005eb69 /system/lib/libweave.so (weave::privet::WifiBootstrapMa nager::GetCurrentlyConnectedSsid() const+8) 04 pc 000553f1 /system/lib/libweave.so (weave::privet::PrivetHandler:: HandleInfo(base::DictionaryValue const&, weave::privet:: UserInfo const&, base::Ca) 05 pc 00058333 /system/lib/libweave.so (weave::privet::PrivetHandler:: HandleRequest(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1:) Change-Id: I9403a75fb4e4f022312b288d86332d5e5cc76f9d
-rw-r--r--buffet/shill_client.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/buffet/shill_client.cc b/buffet/shill_client.cc
index 8e6e1e9..afaebba 100644
--- a/buffet/shill_client.cc
+++ b/buffet/shill_client.cc
@@ -219,8 +219,10 @@ void ShillClient::StopAccessPoint() {
std::string ShillClient::GetConnectedSsid() const {
for (const auto& kv : devices_) {
VariantDictionary properties;
- if (!kv.second.selected_service->GetProperties(&properties, nullptr))
+ if (kv.second.selected_service &&
+ (!kv.second.selected_service->GetProperties(&properties, nullptr))) {
continue;
+ }
auto property_it = properties.find(shill::kWifiHexSsid);
if (property_it == properties.end()) continue;