commit | abd3b50b0c3b6cde124892134091328d2b6dd5e3 | [log] [tgz] |
---|---|---|
author | Christopher Wiley <wiley@chromium.org> | Wed Sep 26 13:08:52 2012 -0700 |
committer | Gerrit <chrome-bot@google.com> | Mon Oct 01 11:10:25 2012 -0700 |
tree | f7c0d00b60d268582628379e48a3fc76aa5879ee | |
parent | 876efd3172536eaf5ce17be552a06f556a8cf76d [diff] |
shill: Disconnect a service on DHCP lease failure Fix a bug where failing to acquire a DHCP lease would result in permanent device offline state. This happens because marking a service as disconnected doesn't work through any of the logic to trigger an actual disconnect from the actually fully associated service. For instance, in WiFi's case, this leaves the service associated in the eye's of wifi.cc, but in some state outside of the typical state machine for connecting services. Thus shill does nothing, leaving users to wonder. device.cc should ask the service to disconnect itself rather than changing its state unbeknownst to the service. However, there does not seem to be a path to disconnect a service without marking the disconnect as user initiated. Create such a path. I've gone over the callsites and looked for places where they might assume that the service won't be autoconnected again, and not found problems on inspection. At worst, we'll just be auto connecting some services we didn't used to. In some places, like cellular, it seems like we Disconnect when we find we are roaming, which doesn't seem like a permanent/non autoconnectable offense. TEST=Unit tests BUG=chromium-os:32279 Change-Id: I34b60f3c009c276efac5d7e51495dc5681bf4b5f Reviewed-on: https://gerrit.chromium.org/gerrit/34195 Commit-Ready: Christopher Wiley <wiley@chromium.org> Reviewed-by: Christopher Wiley <wiley@chromium.org> Tested-by: Christopher Wiley <wiley@chromium.org>