aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-10-06 23:02:51 -0600
committerTed Gould <ted@gould.cx>2010-10-06 23:02:51 -0600
commit54eacfe376c81914781f367c928bbd14f09b0fb8 (patch)
tree8956614da42bf860a586ebbd5781024886bd1f76
parenta385a3e6dd6dd059f4b7130b513a017dea2ff327 (diff)
downloadayatana-indicator-datetime-54eacfe376c81914781f367c928bbd14f09b0fb8.tar.gz
ayatana-indicator-datetime-54eacfe376c81914781f367c928bbd14f09b0fb8.tar.bz2
ayatana-indicator-datetime-54eacfe376c81914781f367c928bbd14f09b0fb8.zip
Putting in some error catches
-rw-r--r--src/datetime-service.c10
1 files changed, 10 insertions, 0 deletions
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;