Ignore:
Timestamp:
2010-09-03T21:24:58Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
4aa8a04
Parents:
64768d4
Message:

Rearrange things a bit to support multiple NS connections. This is apparently
needed for refreshing auth. tokens.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.c

    r64768d4 rbae0617  
    5353       
    5454        ic->proto_data = md;
    55         md->fd = -1;
    5655       
    5756        if( strchr( acc->user, '@' ) == NULL )
     
    6261        }
    6362       
    64         imcb_log( ic, "Connecting" );
    65        
    66         md->fd = proxy_connect( "messenger.hotmail.com", 1863, msn_ns_connected, ic );
    67         if( md->fd < 0 )
    68         {
    69                 imcb_error( ic, "Could not connect to server" );
    70                 imc_logout( ic, TRUE );
    71                 return;
    72         }
    73        
    7463        md->ic = ic;
    7564        md->away_state = msn_away_state_list;
    7665        md->domaintree = g_tree_new( msn_domaintree_cmp );
    7766       
    78         msn_connections = g_slist_append( msn_connections, ic );
     67        msn_connections = g_slist_prepend( msn_connections, ic );
     68       
     69        imcb_log( ic, "Connecting" );
     70        msn_ns_connect( ic, md->ns, MSN_NS_HOST, MSN_NS_PORT );
    7971}
    8072
     
    9385                */
    9486               
    95                 if( md->fd >= 0 )
    96                         closesocket( md->fd );
    97                
    98                 if( md->handler )
    99                 {
    100                         if( md->handler->rxq ) g_free( md->handler->rxq );
    101                         if( md->handler->cmd_text ) g_free( md->handler->cmd_text );
    102                         g_free( md->handler );
    103                 }
     87                msn_ns_close( md->ns );
     88                msn_ns_close( md->auth );
    10489               
    10590                while( md->switchboards )
Note: See TracChangeset for help on using the changeset viewer.