summaryrefslogtreecommitdiff
path: root/libnm/nm-remote-settings.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-08-05 09:37:23 -0400
committerDan Winship <danw@gnome.org>2014-08-07 15:43:43 -0400
commit9ec70a8877b0ae4f91bbb745702bd7272b44778f (patch)
tree48d1b8b14ed19f3e3bf852df68f3199a140f8100 /libnm/nm-remote-settings.c
parentf8762f7d3f0f916057f2c542163a02a77a6c3bbd (diff)
downloadNetworkManager-9ec70a8877b0ae4f91bbb745702bd7272b44778f.tar.gz
libnm: fix a g_signal_handler_find() call in NMRemoteSettings
NMRemoteSettings was looking for a signal handler on an NMRemoteConnection using only G_SIGNAL_MATCH_FUNC, which means it would get tripped up if a connection was known to two different NMRemoteSettings objects at once. Although that can't happen now, it might in the future if NMRemoteConnection became an NMObject, so use G_SIGNAL_MATCH_DATA too.
Diffstat (limited to 'libnm/nm-remote-settings.c')
-rw-r--r--libnm/nm-remote-settings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnm/nm-remote-settings.c b/libnm/nm-remote-settings.c
index 3418eeb06a..be512c665d 100644
--- a/libnm/nm-remote-settings.c
+++ b/libnm/nm-remote-settings.c
@@ -358,8 +358,8 @@ connection_added (NMRemoteSettings *self,
AddConnectionInfo *addinfo;
const char *path;
- if (!g_signal_handler_find (remote, G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
- G_CALLBACK (connection_visible_changed), NULL)) {
+ if (!g_signal_handler_find (remote, G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL,
+ G_CALLBACK (connection_visible_changed), self)) {
g_signal_connect (remote,
"notify::" NM_REMOTE_CONNECTION_VISIBLE,
G_CALLBACK (connection_visible_changed),