From: <the...@us...> - 2006-08-14 07:37:13
|
Revision: 16750 Author: thekingant Date: 2006-08-14 00:37:11 -0700 (Mon, 14 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16750&view=rev Log Message: ----------- Sametime should be good Modified Paths: -------------- trunk/src/protocols/sametime/sametime.c Modified: trunk/src/protocols/sametime/sametime.c =================================================================== --- trunk/src/protocols/sametime/sametime.c 2006-08-14 07:27:41 UTC (rev 16749) +++ trunk/src/protocols/sametime/sametime.c 2006-08-14 07:37:11 UTC (rev 16750) @@ -226,6 +226,7 @@ /** socket fd */ int socket; gint outpa; /* like inpa, but the other way */ + GaimProxyConnectInfo *connect_info; /** circular buffer for outgoing data */ GaimCircBuffer *sock_buf; @@ -310,7 +311,7 @@ /* connection functions */ -static void connect_cb(gpointer data, gint source); +static void connect_cb(gpointer data, gint source, const gchar *error_message); /* ----- session ------ */ @@ -1669,15 +1670,12 @@ /** Callback passed to gaim_proxy_connect when an account is logged in, and if the session logging in receives a redirect message */ -static void connect_cb(gpointer data, gint source) { +static void connect_cb(gpointer data, gint source, const gchar *error_message) { struct mwGaimPluginData *pd = data; GaimConnection *gc = pd->gc; - if(! g_list_find(gaim_connections_get_all(), pd->gc)) { - close(source); - g_return_if_reached(); - } + pd->connect_info = NULL; if(source < 0) { /* connection failed */ @@ -3683,7 +3681,8 @@ gaim_connection_update_progress(gc, _("Connecting"), 1, MW_CONNECT_STEPS); - if(gaim_proxy_connect(account, host, port, connect_cb, pd) == NULL) { + pd->connect_info = gaim_proxy_connect(account, host, port, connect_cb, pd); + if(pd->connect_info == NULL) { gaim_connection_error(gc, _("Unable to connect to host")); } } @@ -3716,6 +3715,11 @@ gc->inpa = 0; } + if(pd->connect_info != NULL) { + gaim_proxy_connect_cancel(pd->connect_info); + pd->connect_info = NULL; + } + /* clean up the rest */ mwGaimPluginData_free(pd); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |