From: <the...@us...> - 2006-08-14 08:23:32
|
Revision: 16752 Author: thekingant Date: 2006-08-14 01:23:26 -0700 (Mon, 14 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16752&view=rev Log Message: ----------- I don't feel like fixing simple right now, so I'm adding some GAIM_CONNECTION_IS_VALID's to tide us over Modified Paths: -------------- trunk/src/protocols/simple/simple.c Modified: trunk/src/protocols/simple/simple.c =================================================================== --- trunk/src/protocols/simple/simple.c 2006-08-14 08:22:39 UTC (rev 16751) +++ trunk/src/protocols/simple/simple.c 2006-08-14 08:23:26 UTC (rev 16752) @@ -421,16 +421,24 @@ static void simple_input_cb(gpointer data, gint source, GaimInputCondition cond); -static void send_later_cb(gpointer data, gint source) { +static void send_later_cb(gpointer data, gint source, const gchar *error) { GaimConnection *gc = data; - struct simple_account_data *sip = gc->proto_data; + struct simple_account_data *sip; struct sip_connection *conn; + if (!GAIM_CONNECTION_IS_VALID(gc)) + { + if (source >= 0) + close(source); + return; + } + if(source < 0) { gaim_connection_error(gc, _("Could not connect")); return; } + sip = gc->proto_data; sip->fd = source; sip->connecting = FALSE; @@ -1453,16 +1461,24 @@ conn->inputhandler = gaim_input_add(newfd, GAIM_INPUT_READ, simple_input_cb, gc); } -static void login_cb(gpointer data, gint source) { +static void login_cb(gpointer data, gint source, const gchar *error_message) { GaimConnection *gc = data; - struct simple_account_data *sip = gc->proto_data; + struct simple_account_data *sip; struct sip_connection *conn; + if (!GAIM_CONNECTION_IS_VALID(gc)) + { + if (source >= 0) + close(source); + return; + } + if(source < 0) { gaim_connection_error(gc, _("Could not connect")); return; } + sip = gc->proto_data; sip->fd = source; conn = connection_create(sip, source); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |