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
1=== modified file 'src/timezone-geoclue.c'
2--- src/timezone-geoclue.c 2013-06-14 20:59:13 +0000
3+++ src/timezone-geoclue.c 2013-09-03 22:31:26 +0000
4@@ -77,6 +77,18 @@
5 }
6 }
7
8+/* The signal doesn't have the parameter for an error, so it ends up needing
9+ a NULL inserted. */
10+static void
11+on_address_changed_sig (GeoclueAddress * address G_GNUC_UNUSED,
12+ int timestamp G_GNUC_UNUSED,
13+ GHashTable * addy_data,
14+ GeoclueAccuracy * accuracy G_GNUC_UNUSED,
15+ gpointer gself)
16+{
17+ return on_address_changed(address, timestamp, addy_data, accuracy, NULL, gself);
18+}
19+
20 static void
21 on_address_created (GeoclueMasterClient * master G_GNUC_UNUSED,
22 GeoclueAddress * address,
23@@ -95,7 +107,7 @@
24 p->address = g_object_ref (address);
25
26 geoclue_address_get_address_async (address, on_address_changed, gself);
27- g_signal_connect (address, "address-changed", G_CALLBACK(on_address_changed), gself);
28+ g_signal_connect (address, "address-changed", G_CALLBACK(on_address_changed_sig), gself);
29 }
30 }
31
32@@ -161,7 +173,7 @@
33
34 if (p->address != NULL)
35 {
36- g_signal_handlers_disconnect_by_func (p->address, on_address_changed, self);
37+ g_signal_handlers_disconnect_by_func (p->address, on_address_changed_sig, self);
38 g_clear_object (&p->address);
39 }
40

Subscribers

People subscribed via source and target branches