Changeset 46dca11 for protocols/msn/sb.c
- Timestamp:
- 2008-01-06T12:32:27Z (16 years ago)
- Branches:
- master
- Children:
- 43462708
- Parents:
- 1febf5c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/sb.c
r1febf5c r46dca11 128 128 if( strcmp( text, TYPING_NOTIFICATION_MESSAGE ) != 0 ) 129 129 { 130 buf = g_new0( char, sizeof( MSN_MESSAGE_HEADERS ) + strlen( text ) * 2 );130 buf = g_new0( char, sizeof( MSN_MESSAGE_HEADERS ) + strlen( text ) * 2 + 1 ); 131 131 i = strlen( MSN_MESSAGE_HEADERS ); 132 132 … … 207 207 debug( "Destroying switchboard: %s", sb->who ? sb->who : sb->key ? sb->key : "" ); 208 208 209 if( sb->msgq ) 210 { 211 struct msn_message *m; 212 GSList *l; 213 214 for( l = sb->msgq; l; l = l->next ) 215 { 216 m = l->data; 217 218 g_free( m->who ); 219 g_free( m->text ); 220 g_free( m ); 221 } 222 g_slist_free( sb->msgq ); 223 224 imcb_log( ic, "Warning: Closing down MSN switchboard connection with " 225 "unsent message to %s, you'll have to resend it.", 226 sb->who ? sb->who : "(unknown)" ); 227 } 209 msn_msgq_purge( ic, &sb->msgq ); 228 210 229 211 if( sb->key ) g_free( sb->key ); … … 266 248 if( source != sb->fd ) 267 249 { 268 debug( "E RROR%d while connecting to switchboard server", 1 );250 debug( "Error %d while connecting to switchboard server", 1 ); 269 251 msn_sb_destroy( sb ); 270 252 return FALSE; … … 287 269 sb->inp = b_input_add( sb->fd, GAIM_INPUT_READ, msn_sb_callback, sb ); 288 270 else 289 debug( "E RROR%d while connecting to switchboard server", 2 );271 debug( "Error %d while connecting to switchboard server", 2 ); 290 272 291 273 return FALSE; … … 298 280 if( msn_handler( sb->handler ) == -1 ) 299 281 { 300 debug( "E RROR: Switchboard died" );282 debug( "Error: Switchboard died" ); 301 283 msn_sb_destroy( sb ); 302 284 … … 555 537 if( sb->who ) 556 538 { 557 struct msn_message *m;558 GSList *l;559 560 539 /* Apparently some invitation failed. We might want to use this 561 540 board later, so keep it as a spare. */ … … 564 543 565 544 /* Also clear the msgq, otherwise someone else might get them. */ 566 for( l = sb->msgq; l; l = l->next ) 567 { 568 m = l->data; 569 g_free( m->who ); 570 g_free( m->text ); 571 g_free( m ); 572 } 573 g_slist_free( sb->msgq ); 574 sb->msgq = NULL; 545 msn_msgq_purge( ic, &sb->msgq ); 575 546 } 576 547
Note: See TracChangeset
for help on using the changeset viewer.