Changeset 84b045d for protocols/msn
- Timestamp:
- 2007-04-16T01:03:08Z (18 years ago)
- Branches:
- master
- Children:
- 6bbb939
- Parents:
- c2fb3809
- Location:
- protocols/msn
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
rc2fb3809 r84b045d 39 39 static void msn_login( account_t *acc ) 40 40 { 41 struct im_connection *ic = imc _new( acc );41 struct im_connection *ic = imcb_new( acc ); 42 42 struct msn_data *md = g_new0( struct msn_data, 1 ); 43 43 … … 47 47 if( strchr( acc->user, '@' ) == NULL ) 48 48 { 49 imc _error( ic, "Invalid account name" );49 imcb_error( ic, "Invalid account name" ); 50 50 imc_logout( ic, FALSE ); 51 51 return; 52 52 } 53 53 54 imc _log( ic, "Connecting" );54 imcb_log( ic, "Connecting" ); 55 55 56 56 md->fd = proxy_connect( "messenger.hotmail.com", 1863, msn_ns_connected, ic ); 57 57 if( md->fd < 0 ) 58 58 { 59 imc _error( ic, "Could not connect to server" );59 imcb_error( ic, "Could not connect to server" ); 60 60 imc_logout( ic, TRUE ); 61 61 return; … … 96 96 m = l->data; 97 97 98 imc _log( ic, "Warning: Closing down MSN connection with unsent message to %s, you'll have to resend it.", m->who );98 imcb_log( ic, "Warning: Closing down MSN connection with unsent message to %s, you'll have to resend it.", m->who ); 99 99 g_free( m->who ); 100 100 g_free( m->text ); … … 228 228 { 229 229 /* Just make an URL and let the user fetch the info */ 230 imc _log( ic, "%s\n%s: %s%s", _("User Info"), _("For now, fetch yourself"), PROFILE_URL, who );230 imcb_log( ic, "%s\n%s: %s%s", _("User Info"), _("For now, fetch yourself"), PROFILE_URL, who ); 231 231 } 232 232 … … 373 373 if( strlen( value ) > 129 ) 374 374 { 375 imc _log( ic, "Maximum name length exceeded" );375 imcb_log( ic, "Maximum name length exceeded" ); 376 376 return NULL; 377 377 } -
protocols/msn/msn_util.c
rc2fb3809 r84b045d 36 36 if( st != len ) 37 37 { 38 imc _error( ic, "Short write() to main server" );38 imcb_error( ic, "Short write() to main server" ); 39 39 imc_logout( ic, TRUE ); 40 40 return( 0 ); … … 46 46 int msn_logged_in( struct im_connection *ic ) 47 47 { 48 imc _connected( ic );48 imcb_connected( ic ); 49 49 50 50 return( 0 ); … … 95 95 96 96 if( find_buddy( bla->ic, bla->handle ) == NULL ) 97 show_got_added( bla->ic, bla->handle, NULL );97 imcb_ask_add( bla->ic, bla->handle, NULL ); 98 98 99 99 g_free( bla->handle ); … … 123 123 "The user %s (%s) wants to add you to his/her buddy list.", 124 124 handle, realname ); 125 do_ask_dialog( ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no );125 imcb_ask( ic, buf, bla, msn_buddy_ask_yes, msn_buddy_ask_no ); 126 126 } 127 127 -
protocols/msn/ns.c
rc2fb3809 r84b045d 47 47 if( source == -1 ) 48 48 { 49 imc _error( ic, "Could not connect to server" );49 imcb_error( ic, "Could not connect to server" ); 50 50 imc_logout( ic, TRUE ); 51 51 return FALSE; … … 76 76 { 77 77 ic->inpa = b_input_add( md->fd, GAIM_INPUT_READ, msn_ns_callback, ic ); 78 imc _log( ic, "Connected to server, waiting for reply" );78 imcb_log( ic, "Connected to server, waiting for reply" ); 79 79 } 80 80 … … 89 89 if( msn_handler( md->handler ) == -1 ) /* Don't do this on ret == 0, it's already done then. */ 90 90 { 91 imc _error( ic, "Error while reading from server" );91 imcb_error( ic, "Error while reading from server" ); 92 92 imc_logout( ic, TRUE ); 93 93 … … 114 114 if( cmd[2] && strncmp( cmd[2], "MSNP8", 5 ) != 0 ) 115 115 { 116 imc _error( ic, "Unsupported protocol" );116 imcb_error( ic, "Unsupported protocol" ); 117 117 imc_logout( ic, FALSE ); 118 118 return( 0 ); … … 143 143 if( !server ) 144 144 { 145 imc _error( ic, "Syntax error" );145 imcb_error( ic, "Syntax error" ); 146 146 imc_logout( ic, TRUE ); 147 147 return( 0 ); … … 151 151 server = cmd[3]; 152 152 153 imc _log( ic, "Transferring to other server" );153 imcb_log( ic, "Transferring to other server" ); 154 154 155 155 md->fd = proxy_connect( server, port, msn_ns_connected, ic ); … … 162 162 if( !server ) 163 163 { 164 imc _error( ic, "Syntax error" );164 imcb_error( ic, "Syntax error" ); 165 165 imc_logout( ic, TRUE ); 166 166 return( 0 ); … … 172 172 if( strcmp( cmd[4], "CKI" ) != 0 ) 173 173 { 174 imc _error( ic, "Unknown authentication method for switchboard" );174 imcb_error( ic, "Unknown authentication method for switchboard" ); 175 175 imc_logout( ic, TRUE ); 176 176 return( 0 ); … … 204 204 else 205 205 { 206 imc _error( ic, "Syntax error" );206 imcb_error( ic, "Syntax error" ); 207 207 imc_logout( ic, TRUE ); 208 208 return( 0 ); … … 216 216 if( !passport_get_id( msn_auth_got_passport_id, ic, ic->acc->user, ic->acc->pass, cmd[4] ) ) 217 217 { 218 imc _error( ic, "Error while contacting Passport server" );218 imcb_error( ic, "Error while contacting Passport server" ); 219 219 imc_logout( ic, TRUE ); 220 220 return( 0 ); … … 236 236 } 237 237 238 imc _log( ic, "Authenticated, getting buddy list" );238 imcb_log( ic, "Authenticated, getting buddy list" ); 239 239 240 240 g_snprintf( buf, sizeof( buf ), "SYN %d 0\r\n", ++md->trId ); … … 243 243 else 244 244 { 245 imc _error( ic, "Unknown authentication type" );245 imcb_error( ic, "Unknown authentication type" ); 246 246 imc_logout( ic, FALSE ); 247 247 return( 0 ); … … 252 252 if( num_parts != 4 ) 253 253 { 254 imc _error( ic, "Syntax error" );254 imcb_error( ic, "Syntax error" ); 255 255 imc_logout( ic, TRUE ); 256 256 return( 0 ); … … 261 261 if( md->handler->msglen <= 0 ) 262 262 { 263 imc _error( ic, "Syntax error" );263 imcb_error( ic, "Syntax error" ); 264 264 imc_logout( ic, TRUE ); 265 265 return( 0 ); … … 292 292 if( num_parts != 4 && num_parts != 5 ) 293 293 { 294 imc _error( ic, "Syntax error" );294 imcb_error( ic, "Syntax error" ); 295 295 imc_logout( ic, TRUE ); 296 296 return( 0 ); … … 328 328 if( ic->flags & OPT_LOGGED_IN ) 329 329 { 330 imc _log( ic, "Successfully transferred to different server" );330 imcb_log( ic, "Successfully transferred to different server" ); 331 331 g_snprintf( buf, sizeof( buf ), "CHG %d %s %d\r\n", ++md->trId, md->away_state->code, 0 ); 332 332 return( msn_write( ic, buf, strlen( buf ) ) ); … … 344 344 if( num_parts != 4 ) 345 345 { 346 imc _error( ic, "Syntax error" );346 imcb_error( ic, "Syntax error" ); 347 347 imc_logout( ic, TRUE ); 348 348 return( 0 ); … … 363 363 if( num_parts != 3 ) 364 364 { 365 imc _error( ic, "Syntax error" );365 imcb_error( ic, "Syntax error" ); 366 366 imc_logout( ic, TRUE ); 367 367 return( 0 ); … … 385 385 if( num_parts != 6 ) 386 386 { 387 imc _error( ic, "Syntax error" );387 imcb_error( ic, "Syntax error" ); 388 388 imc_logout( ic, TRUE ); 389 389 return( 0 ); … … 413 413 if( num_parts != 5 ) 414 414 { 415 imc _error( ic, "Syntax error" );415 imcb_error( ic, "Syntax error" ); 416 416 imc_logout( ic, TRUE ); 417 417 return( 0 ); … … 438 438 if( num_parts != 7 ) 439 439 { 440 imc _error( ic, "Syntax error" );440 imcb_error( ic, "Syntax error" ); 441 441 imc_logout( ic, TRUE ); 442 442 return( 0 ); … … 448 448 if( !server ) 449 449 { 450 imc _error( ic, "Syntax error" );450 imcb_error( ic, "Syntax error" ); 451 451 imc_logout( ic, TRUE ); 452 452 return( 0 ); … … 458 458 if( strcmp( cmd[3], "CKI" ) != 0 ) 459 459 { 460 imc _error( ic, "Unknown authentication method for switchboard" );460 imcb_error( ic, "Unknown authentication method for switchboard" ); 461 461 imc_logout( ic, TRUE ); 462 462 return( 0 ); … … 478 478 if( strchr( cmd[4], '@' ) == NULL ) 479 479 { 480 imc _error( ic, "Syntax error" );480 imcb_error( ic, "Syntax error" ); 481 481 imc_logout( ic, TRUE ); 482 482 return( 0 ); … … 501 501 if( cmd[1] && strcmp( cmd[1], "OTH" ) == 0 ) 502 502 { 503 imc _error( ic, "Someone else logged in with your account" );503 imcb_error( ic, "Someone else logged in with your account" ); 504 504 allow_reconnect = FALSE; 505 505 } 506 506 else if( cmd[1] && strcmp( cmd[1], "SSD" ) == 0 ) 507 507 { 508 imc _error( ic, "Terminating session because of server shutdown" );508 imcb_error( ic, "Terminating session because of server shutdown" ); 509 509 } 510 510 else 511 511 { 512 imc _error( ic, "Session terminated by remote server (reason unknown)" );512 imcb_error( ic, "Session terminated by remote server (reason unknown)" ); 513 513 } 514 514 … … 520 520 if( num_parts != 5 ) 521 521 { 522 imc _error( ic, "Syntax error" );522 imcb_error( ic, "Syntax error" ); 523 523 imc_logout( ic, TRUE ); 524 524 return( 0 ); … … 548 548 else if( strcmp( cmd[0], "IPG" ) == 0 ) 549 549 { 550 imc _error( ic, "Received IPG command, we don't handle them yet." );550 imcb_error( ic, "Received IPG command, we don't handle them yet." ); 551 551 552 552 md->handler->msglen = atoi( cmd[1] ); … … 554 554 if( md->handler->msglen <= 0 ) 555 555 { 556 imc _error( ic, "Syntax error" );556 imcb_error( ic, "Syntax error" ); 557 557 imc_logout( ic, TRUE ); 558 558 return( 0 ); … … 564 564 const struct msn_status_code *err = msn_status_by_number( num ); 565 565 566 imc _error( ic, "Error reported by MSN server: %s", err->text );566 imcb_error( ic, "Error reported by MSN server: %s", err->text ); 567 567 568 568 if( err->flags & STATUS_FATAL ) … … 618 618 { 619 619 if( arg1 ) 620 imc _log( ic, "The server is going down for maintenance in %s minutes.", arg1 );620 imcb_log( ic, "The server is going down for maintenance in %s minutes.", arg1 ); 621 621 } 622 622 … … 635 635 if( inbox && folders ) 636 636 { 637 imc _log( ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders );637 imcb_log( ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders ); 638 638 } 639 639 } … … 645 645 if( from && fromname ) 646 646 { 647 imc _log( ic, "Received an e-mail message from %s <%s>.", fromname, from );647 imcb_log( ic, "Received an e-mail message from %s <%s>.", fromname, from ); 648 648 } 649 649 } … … 673 673 if( key == NULL ) 674 674 { 675 imc _error( ic, "Error during Passport authentication (%s)",675 imcb_error( ic, "Error during Passport authentication (%s)", 676 676 rep->error_string ? rep->error_string : "Unknown error" ); 677 677 imc_logout( ic, TRUE ); -
protocols/msn/sb.c
rc2fb3809 r84b045d 222 222 g_slist_free( sb->msgq ); 223 223 224 imc _log( ic, "Warning: Closing down MSN switchboard connection with "224 imcb_log( ic, "Warning: Closing down MSN switchboard connection with " 225 225 "unsent message to %s, you'll have to resend it.", 226 226 sb->who ? sb->who : "(unknown)" ); … … 321 321 if( strcmp( cmd[0], "XFR" ) == 0 ) 322 322 { 323 imc _error( ic, "Received an XFR from a switchboard server, unable to comply! This is likely to be a bug, please report it!" );323 imcb_error( ic, "Received an XFR from a switchboard server, unable to comply! This is likely to be a bug, please report it!" ); 324 324 imc_logout( ic, TRUE ); 325 325 return( 0 ); … … 528 528 const struct msn_status_code *err = msn_status_by_number( num ); 529 529 530 imc _error( ic, "Error reported by switchboard server: %s", err->text );530 imcb_error( ic, "Error reported by switchboard server: %s", err->text ); 531 531 532 532 if( err->flags & STATUS_SB_FATAL )
Note: See TracChangeset
for help on using the changeset viewer.