- Timestamp:
- 2010-05-11T21:33:37Z (15 years ago)
- Branches:
- master
- Children:
- 3742fb6
- Parents:
- e73a501
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/sb.c
re73a501 rf8cb76d 328 328 struct msn_data *md = ic->proto_data; 329 329 330 if( msn_handler( sb->handler ) == -1 ) 330 if( msn_handler( sb->handler ) != -1 ) 331 return TRUE; 332 333 if( sb->msgq != NULL ) 331 334 { 332 335 time_t now = time( NULL ); 336 char buf[1024]; 333 337 334 338 if( now - md->first_sb_failure > 600 ) … … 347 351 "There might be problems delivering your messages." ); 348 352 349 if( sb->msgq != NULL ) 350 { 351 char buf[1024]; 352 353 if( md->msgq == NULL ) 354 { 355 md->msgq = sb->msgq; 356 } 357 else 358 { 359 GSList *l; 360 361 for( l = md->msgq; l->next; l = l->next ); 362 l->next = sb->msgq; 363 } 364 sb->msgq = NULL; 365 366 debug( "Moved queued messages back to the main queue, creating a new switchboard to retry." ); 367 g_snprintf( buf, sizeof( buf ), "XFR %d SB\r\n", ++md->trId ); 368 if( !msn_write( ic, buf, strlen( buf ) ) ) 369 return FALSE; 370 } 371 372 msn_sb_destroy( sb ); 373 374 return FALSE; 375 } 376 else 377 { 378 return TRUE; 379 } 353 if( md->msgq == NULL ) 354 { 355 md->msgq = sb->msgq; 356 } 357 else 358 { 359 GSList *l; 360 361 for( l = md->msgq; l->next; l = l->next ); 362 l->next = sb->msgq; 363 } 364 sb->msgq = NULL; 365 366 debug( "Moved queued messages back to the main queue, " 367 "creating a new switchboard to retry." ); 368 g_snprintf( buf, sizeof( buf ), "XFR %d SB\r\n", ++md->trId ); 369 if( !msn_write( ic, buf, strlen( buf ) ) ) 370 return FALSE; 371 } 372 373 msn_sb_destroy( sb ); 374 return FALSE; 380 375 } 381 376
Note: See TracChangeset
for help on using the changeset viewer.