Default to allowing updates when we can't determine the network type.
BUG=None
TEST=Manual -- kill shill.
Change-Id: Ibed384b42ef461d0fb728f587c8e3d15c76a6de1
Reviewed-on: https://chromium-review.googlesource.com/176021
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index be49ef3..b5c67e0 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -42,8 +42,11 @@
NetworkConnectionType type;
ConcreteDbusGlib dbus_iface;
ConnectionManager* connection_manager = system_state_->connection_manager();
- TEST_AND_RETURN_FALSE(connection_manager->GetConnectionType(&dbus_iface,
- &type));
+ if (!connection_manager->GetConnectionType(&dbus_iface, &type)) {
+ LOG(INFO) << "We could not determine our connection type. "
+ << "Defaulting to allow updates.";
+ return true;
+ }
bool is_allowed = connection_manager->IsUpdateAllowedOver(type);
LOG(INFO) << "We are connected via "
<< connection_manager->StringForConnectionType(type)