gsocketlistener: set source object tag before completing the GTask

Otherwise, the finish() method won't find the source object.

https://bugzilla.gnome.org/show_bug.cgi?id=689538
This commit is contained in:
Aleksander Morgado 2012-12-03 15:59:06 +01:00
parent 80c24d36f2
commit ac025007cc

View File

@ -694,12 +694,12 @@ accept_ready (GSocket *accept_socket,
socket = g_socket_accept (accept_socket, g_task_get_cancellable (task), &error);
if (socket)
{
g_task_return_pointer (task, socket, g_object_unref);
source_object = g_object_get_qdata (G_OBJECT (accept_socket), source_quark);
if (source_object)
g_object_set_qdata_full (G_OBJECT (task),
source_quark,
g_object_ref (source_object), g_object_unref);
g_task_return_pointer (task, socket, g_object_unref);
}
else
{