diff options
author | Ted Gould <ted@gould.cx> | 2013-09-04 19:46:04 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-09-04 19:46:04 +0000 |
commit | c312fcce200445ec1e6d9b69f35c6a6cb9e80313 (patch) | |
tree | 1e119c9c7fe38dbd6446437e5449d5333dcde9e9 | |
parent | f47b93edd44b7eb7525f704e7801985e895716c6 (diff) | |
parent | a94dccce7850628e4ed8a3201197f3f84274452e (diff) | |
download | ayatana-indicator-datetime-c312fcce200445ec1e6d9b69f35c6a6cb9e80313.tar.gz ayatana-indicator-datetime-c312fcce200445ec1e6d9b69f35c6a6cb9e80313.tar.bz2 ayatana-indicator-datetime-c312fcce200445ec1e6d9b69f35c6a6cb9e80313.zip |
Fix GeoClue signal handler to have proper prototype. Fixes: https://bugs.launchpad.net/bugs/1195874.
Approved by Charles Kerr, PS Jenkins bot.
-rw-r--r-- | src/timezone-geoclue.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/timezone-geoclue.c b/src/timezone-geoclue.c index 239ac50..f7dcf5c 100644 --- a/src/timezone-geoclue.c +++ b/src/timezone-geoclue.c @@ -77,6 +77,18 @@ on_address_changed (GeoclueAddress * address G_GNUC_UNUSED, } } +/* The signal doesn't have the parameter for an error, so it ends up needing + a NULL inserted. */ +static void +on_address_changed_sig (GeoclueAddress * address G_GNUC_UNUSED, + int timestamp G_GNUC_UNUSED, + GHashTable * addy_data, + GeoclueAccuracy * accuracy G_GNUC_UNUSED, + gpointer gself) +{ + return on_address_changed(address, timestamp, addy_data, accuracy, NULL, gself); +} + static void on_address_created (GeoclueMasterClient * master G_GNUC_UNUSED, GeoclueAddress * address, @@ -95,7 +107,7 @@ on_address_created (GeoclueMasterClient * master G_GNUC_UNUSED, p->address = g_object_ref (address); geoclue_address_get_address_async (address, on_address_changed, gself); - g_signal_connect (address, "address-changed", G_CALLBACK(on_address_changed), gself); + g_signal_connect (address, "address-changed", G_CALLBACK(on_address_changed_sig), gself); } } @@ -161,7 +173,7 @@ geo_stop (IndicatorDatetimeTimezoneGeoclue * self) if (p->address != NULL) { - g_signal_handlers_disconnect_by_func (p->address, on_address_changed, self); + g_signal_handlers_disconnect_by_func (p->address, on_address_changed_sig, self); g_clear_object (&p->address); } |