Changes in protocols/msn/ns.c [911f2eb:a2582c8]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/ns.c
r911f2eb ra2582c8 30 30 #include "md5.h" 31 31 32 static gboolean msn_ns_callback( gpointer data, gint source, b_input_condition cond );32 static void msn_ns_callback( gpointer data, gint source, GaimInputCondition cond ); 33 33 static int msn_ns_command( gpointer data, char **cmd, int num_parts ); 34 34 static int msn_ns_message( gpointer data, char *msg, int msglen, char **cmd, int num_parts ); … … 36 36 static void msn_auth_got_passport_id( struct passport_reply *rep ); 37 37 38 gboolean msn_ns_connected( gpointer data, gint source, b_input_condition cond )38 void msn_ns_connected( gpointer data, gint source, GaimInputCondition cond ) 39 39 { 40 40 struct gaim_connection *gc = data; … … 43 43 44 44 if( !g_slist_find( msn_connections, gc ) ) 45 return FALSE;45 return; 46 46 47 47 if( source == -1 ) … … 49 49 hide_login_progress( gc, "Could not connect to server" ); 50 50 signoff( gc ); 51 return FALSE;51 return; 52 52 } 53 53 … … 75 75 if( msn_write( gc, s, strlen( s ) ) ) 76 76 { 77 gc->inpa = b_input_add( md->fd, GAIM_INPUT_READ, msn_ns_callback, gc );77 gc->inpa = gaim_input_add( md->fd, GAIM_INPUT_READ, msn_ns_callback, gc ); 78 78 set_login_progress( gc, 1, "Connected to server, waiting for reply" ); 79 79 } 80 81 return FALSE;82 80 } 83 81 84 static gboolean msn_ns_callback( gpointer data, gint source, b_input_condition cond )82 void msn_ns_callback( gpointer data, gint source, GaimInputCondition cond ) 85 83 { 86 84 struct gaim_connection *gc = data; … … 91 89 hide_login_progress( gc, "Error while reading from server" ); 92 90 signoff( gc ); 93 94 return FALSE; 95 } 96 else 97 return TRUE; 91 } 98 92 } 99 93 … … 136 130 if( num_parts == 6 && strcmp( cmd[2], "NS" ) == 0 ) 137 131 { 138 b_event_remove( gc->inpa );132 gaim_input_remove( gc->inpa ); 139 133 gc->inpa = 0; 140 134 closesocket( md->fd ); … … 223 217 else if( num_parts == 7 && strcmp( cmd[2], "OK" ) == 0 ) 224 218 { 225 set_t *s;226 227 219 http_decode( cmd[4] ); 228 220 229 221 strncpy( gc->displayname, cmd[4], sizeof( gc->displayname ) ); 230 222 gc->displayname[sizeof(gc->displayname)-1] = 0; 231 232 if( ( s = set_find( &gc->acc->set, "display_name" ) ) )233 {234 g_free( s->value );235 s->value = g_strdup( cmd[4] );236 }237 223 238 224 set_login_progress( gc, 1, "Authenticated, getting buddy list" ); … … 525 511 if( g_strcasecmp( cmd[3], gc->username ) == 0 ) 526 512 { 527 set_t *s;528 529 513 http_decode( cmd[4] ); 530 514 strncpy( gc->displayname, cmd[4], sizeof( gc->displayname ) ); 531 515 gc->displayname[sizeof(gc->displayname)-1] = 0; 532 533 if( ( s = set_find( &gc->acc->set, "display_name" ) ) )534 {535 g_free( s->value );536 s->value = g_strdup( cmd[4] );537 }538 516 } 539 517 else
Note: See TracChangeset
for help on using the changeset viewer.