[glib] Emit changed in g_socket_listener_add_socket, not in add_address
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [glib] Emit changed in g_socket_listener_add_socket, not in add_address
- Date: Mon, 15 Jun 2009 09:50:42 -0400 (EDT)
commit 31cb0bdcb0f334ad904e088acb3a417452a4d67f
Author: Alexander Larsson <alexl redhat com>
Date: Mon Jun 15 15:43:39 2009 +0200
Emit changed in g_socket_listener_add_socket, not in add_address
This way we emit this signal when add_socket is called from another
place than add_address too.
gio/gsocketlistener.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gio/gsocketlistener.c b/gio/gsocketlistener.c
index d0025f5..fd9f98c 100644
--- a/gio/gsocketlistener.c
+++ b/gio/gsocketlistener.c
@@ -241,6 +241,10 @@ g_socket_listener_add_socket (GSocketListener *listener,
g_object_set_qdata_full (G_OBJECT (socket), source_quark,
g_object_ref (source_object), g_object_unref);
+
+ if (G_SOCKET_LISTENER_GET_CLASS (listener)->changed)
+ G_SOCKET_LISTENER_GET_CLASS (listener)->changed (listener);
+
return TRUE;
}
@@ -334,9 +338,6 @@ g_socket_listener_add_address (GSocketListener *listener,
g_object_unref (socket); /* add_socket refs this */
- if (G_SOCKET_LISTENER_GET_CLASS (listener)->changed)
- G_SOCKET_LISTENER_GET_CLASS (listener)->changed (listener);
-
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]