Changeset c2fb3809 for protocols/msn
- Timestamp:
- 2007-04-15T22:39:35Z (18 years ago)
- Branches:
- master
- Children:
- 84b045d
- Parents:
- cd4723c
- Location:
- protocols/msn
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
rcd4723c rc2fb3809 48 48 { 49 49 imc_error( ic, "Invalid account name" ); 50 imc_logout( ic );50 imc_logout( ic, FALSE ); 51 51 return; 52 52 } … … 58 58 { 59 59 imc_error( ic, "Could not connect to server" ); 60 imc_logout( ic );60 imc_logout( ic, TRUE ); 61 61 return; 62 62 } … … 379 379 fn = msn_http_encode( value ); 380 380 381 g_snprintf( buf, sizeof( buf ), "REA %d %s %s\r\n", ++md->trId, ic-> username, fn );381 g_snprintf( buf, sizeof( buf ), "REA %d %s %s\r\n", ++md->trId, ic->acc->user, fn ); 382 382 msn_write( ic, buf, strlen( buf ) ); 383 383 g_free( fn ); -
protocols/msn/msn_util.c
rcd4723c rc2fb3809 37 37 { 38 38 imc_error( ic, "Short write() to main server" ); 39 imc_logout( ic );39 imc_logout( ic, TRUE ); 40 40 return( 0 ); 41 41 } -
protocols/msn/ns.c
rcd4723c rc2fb3809 48 48 { 49 49 imc_error( ic, "Could not connect to server" ); 50 imc_logout( ic );50 imc_logout( ic, TRUE ); 51 51 return FALSE; 52 52 } … … 90 90 { 91 91 imc_error( ic, "Error while reading from server" ); 92 imc_logout( ic );92 imc_logout( ic, TRUE ); 93 93 94 94 return FALSE; … … 115 115 { 116 116 imc_error( ic, "Unsupported protocol" ); 117 imc_logout( ic );117 imc_logout( ic, FALSE ); 118 118 return( 0 ); 119 119 } 120 120 121 121 g_snprintf( buf, sizeof( buf ), "CVR %d 0x0409 mac 10.2.0 ppc macmsgs 3.5.1 macmsgs %s\r\n", 122 ++md->trId, ic-> username);122 ++md->trId, ic->acc->user ); 123 123 return( msn_write( ic, buf, strlen( buf ) ) ); 124 124 } … … 126 126 { 127 127 /* We don't give a damn about the information we just received */ 128 g_snprintf( buf, sizeof( buf ), "USR %d TWN I %s\r\n", ++md->trId, ic-> username);128 g_snprintf( buf, sizeof( buf ), "USR %d TWN I %s\r\n", ++md->trId, ic->acc->user ); 129 129 return( msn_write( ic, buf, strlen( buf ) ) ); 130 130 } … … 144 144 { 145 145 imc_error( ic, "Syntax error" ); 146 imc_logout( ic );146 imc_logout( ic, TRUE ); 147 147 return( 0 ); 148 148 } … … 163 163 { 164 164 imc_error( ic, "Syntax error" ); 165 imc_logout( ic );165 imc_logout( ic, TRUE ); 166 166 return( 0 ); 167 167 } … … 173 173 { 174 174 imc_error( ic, "Unknown authentication method for switchboard" ); 175 imc_logout( ic );175 imc_logout( ic, TRUE ); 176 176 return( 0 ); 177 177 } … … 205 205 { 206 206 imc_error( ic, "Syntax error" ); 207 imc_logout( ic );207 imc_logout( ic, TRUE ); 208 208 return( 0 ); 209 209 } … … 214 214 { 215 215 /* Time for some Passport black magic... */ 216 if( !passport_get_id( msn_auth_got_passport_id, ic, ic-> username, ic->password, 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 imc_error( ic, "Error while contacting Passport server" ); 219 imc_logout( ic );219 imc_logout( ic, TRUE ); 220 220 return( 0 ); 221 221 } … … 244 244 { 245 245 imc_error( ic, "Unknown authentication type" ); 246 imc_logout( ic );246 imc_logout( ic, FALSE ); 247 247 return( 0 ); 248 248 } … … 253 253 { 254 254 imc_error( ic, "Syntax error" ); 255 imc_logout( ic );255 imc_logout( ic, TRUE ); 256 256 return( 0 ); 257 257 } … … 262 262 { 263 263 imc_error( ic, "Syntax error" ); 264 imc_logout( ic );264 imc_logout( ic, TRUE ); 265 265 return( 0 ); 266 266 } … … 293 293 { 294 294 imc_error( ic, "Syntax error" ); 295 imc_logout( ic );295 imc_logout( ic, TRUE ); 296 296 return( 0 ); 297 297 } … … 345 345 { 346 346 imc_error( ic, "Syntax error" ); 347 imc_logout( ic );347 imc_logout( ic, TRUE ); 348 348 return( 0 ); 349 349 } … … 364 364 { 365 365 imc_error( ic, "Syntax error" ); 366 imc_logout( ic );366 imc_logout( ic, TRUE ); 367 367 return( 0 ); 368 368 } … … 386 386 { 387 387 imc_error( ic, "Syntax error" ); 388 imc_logout( ic );388 imc_logout( ic, TRUE ); 389 389 return( 0 ); 390 390 } … … 414 414 { 415 415 imc_error( ic, "Syntax error" ); 416 imc_logout( ic );416 imc_logout( ic, TRUE ); 417 417 return( 0 ); 418 418 } … … 439 439 { 440 440 imc_error( ic, "Syntax error" ); 441 imc_logout( ic );441 imc_logout( ic, TRUE ); 442 442 return( 0 ); 443 443 } … … 449 449 { 450 450 imc_error( ic, "Syntax error" ); 451 imc_logout( ic );451 imc_logout( ic, TRUE ); 452 452 return( 0 ); 453 453 } … … 459 459 { 460 460 imc_error( ic, "Unknown authentication method for switchboard" ); 461 imc_logout( ic );461 imc_logout( ic, TRUE ); 462 462 return( 0 ); 463 463 } … … 479 479 { 480 480 imc_error( ic, "Syntax error" ); 481 imc_logout( ic );481 imc_logout( ic, TRUE ); 482 482 return( 0 ); 483 483 } … … 497 497 else if( strcmp( cmd[0], "OUT" ) == 0 ) 498 498 { 499 int allow_reconnect = TRUE; 500 499 501 if( cmd[1] && strcmp( cmd[1], "OTH" ) == 0 ) 500 502 { 501 503 imc_error( ic, "Someone else logged in with your account" ); 502 ic->wants_to_die = 1;504 allow_reconnect = FALSE; 503 505 } 504 506 else if( cmd[1] && strcmp( cmd[1], "SSD" ) == 0 ) … … 511 513 } 512 514 513 imc_logout( ic );515 imc_logout( ic, allow_reconnect ); 514 516 return( 0 ); 515 517 } … … 519 521 { 520 522 imc_error( ic, "Syntax error" ); 521 imc_logout( ic );522 return( 0 ); 523 } 524 525 if( g_strcasecmp( cmd[3], ic-> username) == 0 )523 imc_logout( ic, TRUE ); 524 return( 0 ); 525 } 526 527 if( g_strcasecmp( cmd[3], ic->acc->user ) == 0 ) 526 528 { 527 529 set_t *s; … … 553 555 { 554 556 imc_error( ic, "Syntax error" ); 555 imc_logout( ic );557 imc_logout( ic, TRUE ); 556 558 return( 0 ); 557 559 } … … 566 568 if( err->flags & STATUS_FATAL ) 567 569 { 568 imc_logout( ic );570 imc_logout( ic, TRUE ); 569 571 return( 0 ); 570 572 } … … 673 675 imc_error( ic, "Error during Passport authentication (%s)", 674 676 rep->error_string ? rep->error_string : "Unknown error" ); 675 imc_logout( ic );677 imc_logout( ic, TRUE ); 676 678 } 677 679 else -
protocols/msn/sb.c
rcd4723c rc2fb3809 142 142 else 143 143 { 144 i = strlen( MSN_TYPING_HEADERS ) + strlen( sb->ic-> username);144 i = strlen( MSN_TYPING_HEADERS ) + strlen( sb->ic->acc->user ); 145 145 buf = g_new0( char, i ); 146 i = g_snprintf( buf, i, MSN_TYPING_HEADERS, sb->ic-> username);146 i = g_snprintf( buf, i, MSN_TYPING_HEADERS, sb->ic->acc->user ); 147 147 } 148 148 … … 188 188 /* Populate the channel. */ 189 189 if( sb->who ) add_chat_buddy( sb->chat, sb->who ); 190 add_chat_buddy( sb->chat, ic-> username);190 add_chat_buddy( sb->chat, ic->acc->user ); 191 191 192 192 /* And make sure the switchboard doesn't look like a regular chat anymore. */ … … 280 280 281 281 if( sb->session == MSN_SB_NEW ) 282 g_snprintf( buf, sizeof( buf ), "USR %d %s %s\r\n", ++sb->trId, ic-> username, sb->key );282 g_snprintf( buf, sizeof( buf ), "USR %d %s %s\r\n", ++sb->trId, ic->acc->user, sb->key ); 283 283 else 284 g_snprintf( buf, sizeof( buf ), "ANS %d %s %s %d\r\n", ++sb->trId, ic-> username, sb->key, sb->session );284 g_snprintf( buf, sizeof( buf ), "ANS %d %s %s %d\r\n", ++sb->trId, ic->acc->user, sb->key, sb->session ); 285 285 286 286 if( msn_sb_write( sb, buf, strlen( buf ) ) ) … … 322 322 { 323 323 imc_error( ic, "Received an XFR from a switchboard server, unable to comply! This is likely to be a bug, please report it!" ); 324 imc_logout( ic );324 imc_logout( ic, TRUE ); 325 325 return( 0 ); 326 326 } … … 384 384 if( num == tot ) 385 385 { 386 add_chat_buddy( sb->chat, ic-> username);386 add_chat_buddy( sb->chat, ic->acc->user ); 387 387 } 388 388 } … … 537 537 else if( err->flags & STATUS_FATAL ) 538 538 { 539 imc_logout( ic );539 imc_logout( ic, TRUE ); 540 540 return 0; 541 541 }
Note: See TracChangeset
for help on using the changeset viewer.