Changeset b79308b for protocols/msn/ns.c
- Timestamp:
- 2008-04-14T13:10:53Z (17 years ago)
- Branches:
- master
- Children:
- 0cab388
- Parents:
- 6cac643 (diff), aa31117 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/ns.c
r6cac643 rb79308b 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 ) … … 214 214 { 215 215 /* Time for some Passport black magic... */ 216 if( !passport_get_ id( msn_auth_got_passport_id, ic, ic->acc->user, ic->acc->pass, cmd[4] ) )216 if( !passport_get_token( msn_auth_got_passport_token, 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_ id( struct passport_reply *rep)676 static void msn_auth_got_passport_token( struct msn_auth_data *mad ) 677 677 { 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" ); 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 ); 691 msn_write( ic, buf, strlen( buf ) ); 692 } 693 else 694 { 695 imcb_error( ic, "Error during Passport authentication: %s", mad->error ); 687 696 imc_logout( ic, TRUE ); 688 697 } 689 else690 {691 g_snprintf( buf, sizeof( buf ), "USR %d TWN S %s\r\n", ++md->trId, key );692 msn_write( ic, buf, strlen( buf ) );693 }694 698 }
Note: See TracChangeset
for help on using the changeset viewer.