shill: Fix incorrect error initialization when enabling modem.
CellularCapabilityUniversal::EnableModem() does not properly initialize
the error value to kOperationInitiated before calling Enable(). This
can cause shill to complete the modem Enable request multiple times,
leading to a crash in shill.
BUG=chromium-os:34070
TEST=Unit tests, network_3GModemControl
Change-Id: Ib25c4f836bb612d32f82c86276dcbbf366431b34
Reviewed-on: https://gerrit.chromium.org/gerrit/31989
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
diff --git a/cellular_capability_universal_unittest.cc b/cellular_capability_universal_unittest.cc
index b26666a..3c57ba3 100644
--- a/cellular_capability_universal_unittest.cc
+++ b/cellular_capability_universal_unittest.cc
@@ -329,7 +329,7 @@
Error error;
capability_->StartModem(&error, callback);
- EXPECT_TRUE(error.IsSuccess());
+ EXPECT_TRUE(error.IsOngoing());
}
TEST_F(CellularCapabilityUniversalTest, StopModem) {