shill: don't auto-connect to a disconnected service
This addresses part of the problem with the 003AsciiKeyWEP40
failure. That test establishes a connection, disconnects,
reconfigures the (WEP) password on an AP, and then tries
to reconnect.
Before this patch, the test failed as follows:
1. shill immediately tries to reconnect after the disconnect.
This reconnect uses the old password (because the test
hasn't had a chance to supply a new password).
2. The test code provides the correct password, and then
initiates an explicit connect. However, the explicit
connect is ignored, because a connection is already in
progress (to the same service).
3. The automatic reconnect fails, because it is using the
wrong password.
BUG=chromium-os:25153,chromium-os:25157
TEST=unit tests, WiFiRoaming, WiFiSecMat.*WEP*, WiFiManager
Testing notes:
- WiFiRoaming had some failures, but no regressions
- WiFiSecMat.*WEP* passed except 003CheckWEP_8021x
(previously, that failed in addition to 000StaticKeyWEP40,
001StaticKeyWEP104, 005SharedKeyWEP40, and 006SharedKeyWEP104.)
- WiFiManager passed
(previously, 003AsciiKeyWEP40 and 004AsciiKeyWEP104 failed.)
Change-Id: I2dd6312006865c914d4193ce3f7d7c5443b84deb
Reviewed-on: https://gerrit.chromium.org/gerrit/14408
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
diff --git a/cellular_service.cc b/cellular_service.cc
index c79329a..43aa917 100644
--- a/cellular_service.cc
+++ b/cellular_service.cc
@@ -48,11 +48,10 @@
CellularService::~CellularService() { }
void CellularService::Connect(Error *error) {
+ Service::Connect(error);
cellular_->Connect(error);
}
-void CellularService::Disconnect(Error */*error*/) { }
-
void CellularService::ActivateCellularModem(const string &carrier,
Error *error) {
cellular_->Activate(carrier, error);