Merge lp:~ted/indicator-datetime/lp1195874 into lp:~indicator-applet-developers/indicator-datetime/trunk.13.10

Proposed by Ted Gould
Status: Merged
Approved by: Charles Kerr
Approved revision: 250
Merged at revision: 249
Proposed branch: lp:~ted/indicator-datetime/lp1195874
Merge into: lp:~indicator-applet-developers/indicator-datetime/trunk.13.10
Diff against target: 39 lines (+14/-2)
1 file modified
src/timezone-geoclue.c (+14/-2)
To merge this branch: bzr merge lp:~ted/indicator-datetime/lp1195874
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+183780@code.launchpad.net

Commit message

Fix GeoClue signal handler to have proper prototype

Description of the change

Take care of the signal handler to have the prototype without the error but still call the handler function with a NULL error.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Thanks Ted!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/timezone-geoclue.c'
--- src/timezone-geoclue.c 2013-06-14 20:59:13 +0000
+++ src/timezone-geoclue.c 2013-09-03 22:31:26 +0000
@@ -77,6 +77,18 @@
77 }77 }
78}78}
7979
80/* The signal doesn't have the parameter for an error, so it ends up needing
81 a NULL inserted. */
82static void
83on_address_changed_sig (GeoclueAddress * address G_GNUC_UNUSED,
84 int timestamp G_GNUC_UNUSED,
85 GHashTable * addy_data,
86 GeoclueAccuracy * accuracy G_GNUC_UNUSED,
87 gpointer gself)
88{
89 return on_address_changed(address, timestamp, addy_data, accuracy, NULL, gself);
90}
91
80static void92static void
81on_address_created (GeoclueMasterClient * master G_GNUC_UNUSED,93on_address_created (GeoclueMasterClient * master G_GNUC_UNUSED,
82 GeoclueAddress * address,94 GeoclueAddress * address,
@@ -95,7 +107,7 @@
95 p->address = g_object_ref (address);107 p->address = g_object_ref (address);
96108
97 geoclue_address_get_address_async (address, on_address_changed, gself);109 geoclue_address_get_address_async (address, on_address_changed, gself);
98 g_signal_connect (address, "address-changed", G_CALLBACK(on_address_changed), gself);110 g_signal_connect (address, "address-changed", G_CALLBACK(on_address_changed_sig), gself);
99 }111 }
100}112}
101113
@@ -161,7 +173,7 @@
161173
162 if (p->address != NULL)174 if (p->address != NULL)
163 {175 {
164 g_signal_handlers_disconnect_by_func (p->address, on_address_changed, self);176 g_signal_handlers_disconnect_by_func (p->address, on_address_changed_sig, self);
165 g_clear_object (&p->address);177 g_clear_object (&p->address);
166 }178 }
167179

Subscribers

People subscribed via source and target branches