aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/msn/msn.c51
-rw-r--r--protocols/nogaim.c3
-rw-r--r--protocols/nogaim.h6
3 files changed, 33 insertions, 27 deletions
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c
index 3c7064f8..bac9c427 100644
--- a/protocols/msn/msn.c
+++ b/protocols/msn/msn.c
@@ -63,33 +63,38 @@ static void msn_close( struct gaim_connection *gc )
struct msn_data *md = gc->proto_data;
GSList *l;
- if( md->fd >= 0 )
- closesocket( md->fd );
-
- if( md->handler )
- {
- if( md->handler->rxq ) g_free( md->handler->rxq );
- if( md->handler->cmd_text ) g_free( md->handler->cmd_text );
- g_free( md->handler );
- }
-
- while( md->switchboards )
- msn_sb_destroy( md->switchboards->data );
-
- if( md->msgq )
+ if( md )
{
- struct msn_message *m;
+ if( md->fd >= 0 )
+ closesocket( md->fd );
- for( l = md->msgq; l; l = l->next )
+ if( md->handler )
{
- m = l->data;
+ if( md->handler->rxq ) g_free( md->handler->rxq );
+ if( md->handler->cmd_text ) g_free( md->handler->cmd_text );
+ g_free( md->handler );
+ }
- serv_got_crap( gc, "Warning: Closing down MSN connection with unsent message to %s, you'll have to resend it.", m->who );
- g_free( m->who );
- g_free( m->text );
- g_free( m );
+ while( md->switchboards )
+ msn_sb_destroy( md->switchboards->data );
+
+ if( md->msgq )
+ {
+ struct msn_message *m;
+
+ for( l = md->msgq; l; l = l->next )
+ {
+ m = l->data;
+
+ serv_got_crap( gc, "Warning: Closing down MSN connection with unsent message to %s, you'll have to resend it.", m->who );
+ g_free( m->who );
+ g_free( m->text );
+ g_free( m );
+ }
+ g_slist_free( md->msgq );
}
- g_slist_free( md->msgq );
+
+ g_free( md );
}
for( l = gc->permit; l; l = l->next )
@@ -100,8 +105,6 @@ static void msn_close( struct gaim_connection *gc )
g_free( l->data );
g_slist_free( gc->deny );
- g_free( md );
-
msn_connections = g_slist_remove( msn_connections, gc );
}
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index b1975f19..78b51b53 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -293,8 +293,9 @@ void signoff( struct gaim_connection *gc )
account_t *a;
serv_got_crap( gc, "Signing off.." );
-
+
b_event_remove( gc->keepalive );
+ gc->flags |= OPT_LOGGING_OUT;
gc->keepalive = 0;
gc->prpl->close( gc );
b_event_remove( gc->inpa );
diff --git a/protocols/nogaim.h b/protocols/nogaim.h
index b0319d27..2080465c 100644
--- a/protocols/nogaim.h
+++ b/protocols/nogaim.h
@@ -53,10 +53,12 @@
#define WEBSITE "http://www.bitlbee.org/"
#define IM_FLAG_AWAY 0x0020
-#define OPT_CONN_HTML 0x00000001
-#define OPT_LOGGED_IN 0x00010000
#define GAIM_AWAY_CUSTOM "Custom"
+#define OPT_CONN_HTML 0x00000001
+#define OPT_LOGGED_IN 0x00010000
+#define OPT_LOGGING_OUT 0x00020000
+
/* ok. now the fun begins. first we create a connection structure */
struct gaim_connection
{