changeset 21725:960c07f6f052

There really is nothing to see here, I'm just catching up with some changes that were dropped while msnp9 was "out of tree", this is from 53760bd543d0a40f81167717a7821f7ec2f16099: Fix incorrect purple_proxy_connect() callback
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 02 Dec 2007 17:29:30 +0000
parents d69d729ba19c
children 56f78bc6c53e
files libpurple/protocols/msnp9/directconn.c
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msnp9/directconn.c	Sun Dec 02 09:25:29 2007 +0000
+++ b/libpurple/protocols/msnp9/directconn.c	Sun Dec 02 17:29:30 2007 +0000
@@ -405,6 +405,15 @@
 	}
 }
 
+static void
+directconn_connect_cb(gpointer data, gint source, const gchar *error_message)
+{
+	if (error_message)
+		purple_debug_error("msn", "Error making direct connection: %s\n", error_message);
+
+	connect_cb(data, source, PURPLE_INPUT_READ);
+}
+
 gboolean
 msn_directconn_connect(MsnDirectConn *directconn, const char *host, int port)
 {
@@ -424,14 +433,9 @@
 #endif
 
 	directconn->connect_data = purple_proxy_connect(NULL, session->account,
-			host, port, connect_cb, directconn);
+			host, port, directconn_connect_cb, directconn);
 
-	if (directconn->connect_data != NULL)
-	{
-		return TRUE;
-	}
-	else
-		return FALSE;
+	return (directconn->connect_data != NULL);
 }
 
 #if 0