AU: Ensure update_engine_client get proxy retries are spaced out in time.
Hopefully, this will reduce test flakyness. It seems that last time the test
failed all 4 tries happened within a one-second timeframe.
Also, fix GError object memory leaks throughout the code.
BUG=chromium-os:21351
TEST=unit tests, tested on VM
Change-Id: If0bc5d5767d12f3396d0fcb46f3e04ed6d7dfd5c
Reviewed-on: http://gerrit.chromium.org/gerrit/8862
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/chrome_proxy_resolver.cc b/chrome_proxy_resolver.cc
index 37ccd8c..25af4f6 100644
--- a/chrome_proxy_resolver.cc
+++ b/chrome_proxy_resolver.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -79,7 +79,8 @@
GError* error = NULL;
DBusGConnection* bus = dbus_->BusGet(DBUS_BUS_SYSTEM, &error);
if (!bus) {
- LOG(ERROR) << "Failed to get System Dbus";
+ LOG(ERROR) << "Failed to get System Dbus: "
+ << utils::GetAndFreeGError(&error);
return NULL;
}
DBusGProxy* proxy = dbus_->ProxyNewForNameOwner(bus,
@@ -89,7 +90,7 @@
&error);
if (!proxy) {
LOG(ERROR) << "Error getting FlimFlam proxy: "
- << utils::GetGErrorMessage(error);
+ << utils::GetAndFreeGError(&error);
}
return proxy;
}
@@ -101,7 +102,7 @@
kProxyModePACScript,
kProxyModeSingle,
kProxyModeProxyPerScheme
-};
+};
} // namespace {}
bool ChromeProxyResolver::GetProxiesForUrlWithSettings(