shill: LTE: handle connect completion message after service gone
Fine tune the logging, supressing some meaningless logs, and adding
logging where it is helpful in reconstructing what happened.
CellularCapabilityUniversal::OnConnectReply() may be called when there
are no cellular service. This CL checks to make sure the service is
valid before using it. See also
https://gerrit.chromium.org/gerrit/23042
TEST=network_3GModemControl and network_3GPseudoModemControl
BUG=none
Change-Id: Ie81e9df42270045cde0aeb0a975f8412cc3e7a25
Reviewed-on: https://gerrit.chromium.org/gerrit/23389
Tested-by: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Ready: Jason Glasgow <jglasgow@chromium.org>
diff --git a/device.cc b/device.cc
index d0095e7..ea7c5c5 100644
--- a/device.cc
+++ b/device.cc
@@ -722,7 +722,7 @@
SLOG(Device, 2) << __func__ << "(" << enable << ")";
Error error;
SetEnabledInternal(enable, false, &error, ResultCallback());
- LOG_IF(ERROR, error.IsFailure())
+ LOG_IF(ERROR, error.IsFailure() && !error.IsOngoing())
<< "Enabled failed, but no way to report the failure.";
}