diff libgaim/protocols/simple/simple.c @ 14837:118fd0dc5b6e

[gaim-migrate @ 17606] Add a "handle" parameter to gaim_proxy_connect(). It seemed like people thought this was a good idea. You can still cancel each gaim_proxy_connect() individually, if needed. I passed in NULL for the handle in most places. It might be better to pass in the gc in more places, but these changes do no harm, and they should help some Yahoo! things, and I wanted to get the API change in. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 28 Oct 2006 20:04:03 +0000
parents eb2152e14df9
children 478e64cf96fe
line wrap: on
line diff
--- a/libgaim/protocols/simple/simple.c	Sat Oct 28 19:52:30 2006 +0000
+++ b/libgaim/protocols/simple/simple.c	Sat Oct 28 20:04:03 2006 +0000
@@ -457,12 +457,10 @@
 
 static void sendlater(GaimConnection *gc, const char *buf) {
 	struct simple_account_data *sip = gc->proto_data;
-	GaimProxyConnectData *connect_data;
 
 	if(!sip->connecting) {
 		gaim_debug_info("simple", "connecting to %s port %d\n", sip->realhostname ? sip->realhostname : "{NULL}", sip->realport);
-		connect_data = gaim_proxy_connect(sip->account, sip->realhostname, sip->realport, send_later_cb, gc);
-		if(connect_data == NULL) {
+		if (gaim_proxy_connect(gc, sip->account, sip->realhostname, sip->realport, send_later_cb, gc) == NULL) {
 			gaim_connection_error(gc, _("Couldn't create socket"));
 		}
 		sip->connecting = TRUE;
@@ -1565,7 +1563,6 @@
 static void
 simple_tcp_connect_listen_cb(int listenfd, gpointer data) {
 	struct simple_account_data *sip = (struct simple_account_data*) data;
-	GaimProxyConnectData *connect_data;
 
 	sip->listen_data = NULL;
 
@@ -1582,9 +1579,8 @@
 	gaim_debug_info("simple", "connecting to %s port %d\n",
 			sip->realhostname, sip->realport);
 	/* open tcp connection to the server */
-	connect_data = gaim_proxy_connect(sip->account, sip->realhostname,
-			sip->realport, login_cb, sip->gc);
-	if(connect_data == NULL) {
+	if (gaim_proxy_connect(sip->gc, sip->account, sip->realhostname,
+			sip->realport, login_cb, sip->gc) == NULL) {
 		gaim_connection_error(sip->gc, _("Couldn't create socket"));
 	}
 }