[glib/glib-2-34] g_socket_connection_connect_async: handle cancellation
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-34] g_socket_connection_connect_async: handle cancellation
- Date: Tue, 16 Oct 2012 14:26:14 +0000 (UTC)
commit ce92bea73571791f60762b2bb66e28e603543570
Author: Dan Winship <danw gnome org>
Date: Tue Oct 16 10:22:56 2012 -0400
g_socket_connection_connect_async: handle cancellation
g_socket_connection_connect_finish() was returning TRUE when the
connection attempt got cancelled. Fix that by using
g_simple_async_result_set_check_cancellable(). (Git master doesn't
have the bug because GTask behaves that way by default.)
https://bugzilla.gnome.org/show_bug.cgi?id=686213
gio/gsocketconnection.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/gsocketconnection.c b/gio/gsocketconnection.c
index a881a47..0118b8c 100644
--- a/gio/gsocketconnection.c
+++ b/gio/gsocketconnection.c
@@ -206,6 +206,8 @@ g_socket_connection_connect_async (GSocketConnection *connection,
{
GSource *source;
+ g_simple_async_result_set_check_cancellable (simple, cancellable);
+
g_error_free (tmp_error);
source = g_socket_create_source (connection->priv->socket,
G_IO_OUT, cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]