[gnome-initial-setup/shell/4765: 315/362] location: don't log critical warnings for CANCELLED errors
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/shell/4765: 315/362] location: don't log critical warnings for CANCELLED errors
- Date: Thu, 19 Mar 2015 01:47:33 +0000 (UTC)
commit 5d83bbfadf285eef5ee5c960f4793988029a2fbf
Author: Cosimo Cecchi <cosimo endlesm com>
Date: Tue Dec 30 15:44:01 2014 +0800
location: don't log critical warnings for CANCELLED errors
These are expected when switching language.
.../pages/location/cc-timezone-monitor.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/gnome-initial-setup/pages/location/cc-timezone-monitor.c
b/gnome-initial-setup/pages/location/cc-timezone-monitor.c
index 8f20168..b3bf825 100644
--- a/gnome-initial-setup/pages/location/cc-timezone-monitor.c
+++ b/gnome-initial-setup/pages/location/cc-timezone-monitor.c
@@ -236,7 +236,9 @@ on_location_proxy_ready (GObject *source_object,
location = geoclue_location_proxy_new_for_bus_finish (res, &error);
if (error != NULL) {
- g_critical ("Failed to connect to GeoClue2 service: %s", error->message);
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ g_critical ("Failed to connect to GeoClue2 service: %s", error->message);
+
g_error_free (error);
return;
}
@@ -277,7 +279,9 @@ on_start_ready (GObject *source_object,
if (!geoclue_client_call_start_finish (GEOCLUE_CLIENT (source_object),
res,
&error)) {
- g_critical ("Failed to start GeoClue2 client: %s", error->message);
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ g_critical ("Failed to start GeoClue2 client: %s", error->message);
+
g_error_free (error);
return;
}
@@ -295,7 +299,9 @@ on_client_proxy_ready (GObject *source_object,
client = geoclue_client_proxy_new_for_bus_finish (res, &error);
if (error != NULL) {
- g_critical ("Failed to connect to GeoClue2 service: %s", error->message);
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ g_critical ("Failed to connect to GeoClue2 service: %s", error->message);
+
g_error_free (error);
return;
}
@@ -331,7 +337,9 @@ on_get_client_ready (GObject *source_object,
&client_path,
res,
&error)) {
- g_critical ("Failed to connect to GeoClue2 service: %s", error->message);
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ g_critical ("Failed to connect to GeoClue2 service: %s", error->message);
+
g_error_free (error);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]