From 54eacfe376c81914781f367c928bbd14f09b0fb8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 6 Oct 2010 23:02:51 -0600 Subject: Putting in some error catches --- src/datetime-service.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/datetime-service.c b/src/datetime-service.c index 7ab6b63..420148d 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -244,6 +244,11 @@ setup_timer (void) static void geo_address_cb (GeoclueAddress * address, int timestamp, GHashTable * addy_data, GeoclueAccuracy * accuracy, GError * error, gpointer user_data) { + if (error != NULL) { + g_warning("Unable to get Geoclue address: %s", error->message); + return; + } + g_debug("Geoclue timezone is: %s", (gchar *)g_hash_table_lookup(addy_data, "timezone")); return; } @@ -252,6 +257,11 @@ geo_address_cb (GeoclueAddress * address, int timestamp, GHashTable * addy_data, static void geo_create_address (GeoclueMasterClient * master, GeoclueAddress * address, GError * error, gpointer user_data) { + if (error != NULL) { + g_warning("Unable to create GeoClue address: %s", error->message); + return; + } + g_debug("Created Geoclue Address"); geo_address = address; -- cgit v1.2.3