shill: cellular: Disconnect service on suspend.
Also, suppress auto-connect as soon as the SuspendDelay signal is
received. Schedule a timeout to detect failed or interrupted suspend
and re-enable auto-connect.
BUG=chromium-os:30587,chromium-os:33412
TEST=unit tests, tested on device through inspecting logs
Change-Id: If40f8217e4d9b222a698532054287ae9b4fcb4d6
Reviewed-on: https://gerrit.chromium.org/gerrit/34342
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/hook_table.cc b/hook_table.cc
index d53f78c..d04842b 100644
--- a/hook_table.cc
+++ b/hook_table.cc
@@ -97,6 +97,7 @@
void HookTable::ActionsTimedOut() {
done_cb_.Run(Error(Error::kOperationTimeout));
+ done_cb_.Reset();
}
} // namespace shill