system/connectivity/wificond
Révision | af01f9f2cd9f642b77699ea82a753e5d0895b7ac (tree) |
---|---|
l'heure | 2017-07-20 07:48:53 |
Auteur | Ningyuan Wang <nywang@goog...> |
Commiter | Ningyuan Wang |
Do not crash on netlink manager start error
For some device(emulator) kernel netlink interface is not configured.
NetlinkManager.Start() will fail and crash wificond.
Wificond is included in base.mk so it is not feasible to remove
it from emulator image.
This patch changes the error level from FATAL to ERROR to avoid
crashing.
Bug: 63837784
Test: compile, manual test wificond works
Change-Id: I0cf3f6a1ea73e455f8362870e4c96c76b59dd41c
@@ -139,7 +139,9 @@ int main(int argc, char** argv) { | ||
139 | 139 | &OnHwBinderReadReady)) << "Failed to watch Hw Binder FD"; |
140 | 140 | |
141 | 141 | android::wificond::NetlinkManager netlink_manager(event_dispatcher.get()); |
142 | - CHECK(netlink_manager.Start()) << "Failed to start netlink manager"; | |
142 | + if (!netlink_manager.Start()) { | |
143 | + LOG(ERROR) << "Failed to start netlink manager"; | |
144 | + } | |
143 | 145 | android::wificond::NetlinkUtils netlink_utils(&netlink_manager); |
144 | 146 | android::wificond::ScanUtils scan_utils(&netlink_manager); |
145 | 147 |