Changeset d84e2a9 for protocols/msn/ns.c
- Timestamp:
- 2008-08-02T11:21:36Z (16 years ago)
- Branches:
- master
- Children:
- 280e655
- Parents:
- e0798cc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/ns.c
re0798cc rd84e2a9 34 34 static int msn_ns_message( gpointer data, char *msg, int msglen, char **cmd, int num_parts ); 35 35 36 static void msn_auth_got_passport_ id( struct passport_reply *rep);36 static void msn_auth_got_passport_token( struct msn_auth_data *mad ); 37 37 38 38 gboolean msn_ns_connected( gpointer data, gint source, b_input_condition cond ) … … 222 222 { 223 223 /* Time for some Passport black magic... */ 224 if( !passport_get_ id( msn_auth_got_passport_id, ic, ic->acc->user, ic->acc->pass, cmd[4] ) )224 if( !passport_get_token( msn_auth_got_passport_token, ic, ic->acc->user, ic->acc->pass, cmd[4] ) ) 225 225 { 226 226 imcb_error( ic, "Error while contacting Passport server" ); … … 709 709 } 710 710 711 static void msn_auth_got_passport_ id( struct passport_reply *rep)711 static void msn_auth_got_passport_token( struct msn_auth_data *mad ) 712 712 { 713 struct im_connection *ic = rep->data; 714 struct msn_data *md = ic->proto_data; 715 char *key = rep->result; 716 char buf[1024]; 717 718 if( key == NULL ) 719 { 720 imcb_error( ic, "Error during Passport authentication (%s)", 721 rep->error_string ? rep->error_string : "Unknown error" ); 713 struct im_connection *ic = mad->data; 714 struct msn_data *md; 715 716 /* Dead connection? */ 717 if( g_slist_find( msn_connections, ic ) == NULL ) 718 return; 719 720 md = ic->proto_data; 721 if( mad->token ) 722 { 723 char buf[1024]; 724 725 g_snprintf( buf, sizeof( buf ), "USR %d TWN S %s\r\n", ++md->trId, mad->token ); 726 msn_write( ic, buf, strlen( buf ) ); 727 } 728 else 729 { 730 imcb_error( ic, "Error during Passport authentication: %s", mad->error ); 722 731 imc_logout( ic, TRUE ); 723 732 } 724 else725 {726 g_snprintf( buf, sizeof( buf ), "USR %d TWN S %s\r\n", ++md->trId, key );727 msn_write( ic, buf, strlen( buf ) );728 }729 733 }
Note: See TracChangeset
for help on using the changeset viewer.