Changes in protocols/msn/ns.c [e6648bf:8ff0a61]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/ns.c
re6648bf r8ff0a61 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_ token( struct msn_auth_data *mad);36 static void msn_auth_got_passport_id( struct passport_reply *rep ); 37 37 38 38 gboolean msn_ns_connected( gpointer data, gint source, b_input_condition cond ) … … 214 214 { 215 215 /* Time for some Passport black magic... */ 216 if( !passport_get_ token( msn_auth_got_passport_token, ic, ic->acc->user, ic->acc->pass, cmd[4] ) )216 if( !passport_get_id( msn_auth_got_passport_id, ic, ic->acc->user, ic->acc->pass, cmd[4] ) ) 217 217 { 218 218 imcb_error( ic, "Error while contacting Passport server" ); … … 674 674 } 675 675 676 static void msn_auth_got_passport_ token( struct msn_auth_data *mad)676 static void msn_auth_got_passport_id( struct passport_reply *rep ) 677 677 { 678 struct im_connection *ic = mad->data; 679 struct msn_data *md; 680 681 /* Dead connection? */ 682 if( g_slist_find( msn_connections, ic ) == NULL ) 683 return; 684 685 md = ic->proto_data; 686 if( mad->token ) 687 { 688 char buf[1024]; 689 690 g_snprintf( buf, sizeof( buf ), "USR %d TWN S %s\r\n", ++md->trId, mad->token ); 678 struct im_connection *ic = rep->data; 679 struct msn_data *md = ic->proto_data; 680 char *key = rep->result; 681 char buf[1024]; 682 683 if( key == NULL ) 684 { 685 imcb_error( ic, "Error during Passport authentication (%s)", 686 rep->error_string ? rep->error_string : "Unknown error" ); 687 imc_logout( ic, TRUE ); 688 } 689 else 690 { 691 g_snprintf( buf, sizeof( buf ), "USR %d TWN S %s\r\n", ++md->trId, key ); 691 692 msn_write( ic, buf, strlen( buf ) ); 692 693 } 693 else694 {695 imcb_error( ic, "Error during Passport authentication: %s", mad->error );696 imc_logout( ic, TRUE );697 }698 694 }
Note: See TracChangeset
for help on using the changeset viewer.