Changeset ec86b22 for protocols/msn/sb.c


Ignore:
Timestamp:
2010-05-15T23:28:16Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
2309152
Parents:
ca0981a (diff), 6e6b3d7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Mainline merge. (Probably mostly irrelevant for this branch, oh well.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/sb.c

    rca0981a rec86b22  
    334334        struct msn_data *md = ic->proto_data;
    335335       
    336         if( msn_handler( sb->handler ) == -1 )
     336        if( msn_handler( sb->handler ) != -1 )
     337                return TRUE;
     338       
     339        if( sb->msgq != NULL )
    337340        {
    338341                time_t now = time( NULL );
     342                char buf[1024];
    339343               
    340344                if( now - md->first_sb_failure > 600 )
     
    353357                                      "There might be problems delivering your messages." );
    354358               
    355                 if( sb->msgq != NULL )
    356                 {
    357                         char buf[1024];
    358                        
    359                         if( md->msgq == NULL )
    360                         {
    361                                 md->msgq = sb->msgq;
    362                         }
    363                         else
    364                         {
    365                                 GSList *l;
    366                                
    367                                 for( l = md->msgq; l->next; l = l->next );
    368                                 l->next = sb->msgq;
    369                         }
    370                         sb->msgq = NULL;
    371                        
    372                         debug( "Moved queued messages back to the main queue, creating a new switchboard to retry." );
    373                         g_snprintf( buf, sizeof( buf ), "XFR %d SB\r\n", ++md->trId );
    374                         if( !msn_write( ic, buf, strlen( buf ) ) )
    375                                 return FALSE;
    376                 }
    377                
    378                 msn_sb_destroy( sb );
    379                
    380                 return FALSE;
    381         }
    382         else
    383         {
    384                 return TRUE;
    385         }
     359                if( md->msgq == NULL )
     360                {
     361                        md->msgq = sb->msgq;
     362                }
     363                else
     364                {
     365                        GSList *l;
     366                       
     367                        for( l = md->msgq; l->next; l = l->next );
     368                        l->next = sb->msgq;
     369                }
     370                sb->msgq = NULL;
     371               
     372                debug( "Moved queued messages back to the main queue, "
     373                       "creating a new switchboard to retry." );
     374                g_snprintf( buf, sizeof( buf ), "XFR %d SB\r\n", ++md->trId );
     375                if( !msn_write( ic, buf, strlen( buf ) ) )
     376                        return FALSE;
     377        }
     378       
     379        msn_sb_destroy( sb );
     380        return FALSE;
    386381}
    387382
Note: See TracChangeset for help on using the changeset viewer.