comparison src/protocols/msn/msn.c @ 4793:677d3cb193a1

[gaim-migrate @ 5113] this removes all the remaining deprecated glib, gdk, gdk-pixbuf, and gtk function calls. Hopefully I didn't break anything. Most of this is due to the deprecation of g_strcasecmp and g_strncasecmp. Two functions I never thought would be deprecated, but apparently they're no good at comparing utf8 text. g_ascii_str{,n}casecmp is OK when you're sure that it's ASCII. Otherwise, we're supposed to use g_utf8_collate(), except that it is case sensitive. Since glib doesn't currently have a case-insensitive one, I wrote one. If you need to compare utf8 text, you can use gaim_utf8_strcasecmp(). I have to go do dishes now. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 16 Mar 2003 00:01:49 +0000
parents 01cae9259e2f
children d9b6b5ae34e4
comparison
equal deleted inserted replaced
4792:9212d1c5b7dc 4793:677d3cb193a1
326 static int msn_process_main(struct gaim_connection *gc, char *buf) 326 static int msn_process_main(struct gaim_connection *gc, char *buf)
327 { 327 {
328 struct msn_data *md = gc->proto_data; 328 struct msn_data *md = gc->proto_data;
329 char sendbuf[MSN_BUF_LEN]; 329 char sendbuf[MSN_BUF_LEN];
330 330
331 if (!g_strncasecmp(buf, "ADD", 3)) { 331 if (!g_ascii_strncasecmp(buf, "ADD", 3)) {
332 char *list, *user, *friend, *tmp = buf; 332 char *list, *user, *friend, *tmp = buf;
333 struct msn_add_permit *ap; 333 struct msn_add_permit *ap;
334 GSList *perm = gc->account->permit; 334 GSList *perm = gc->account->permit;
335 char msg[MSN_BUF_LEN]; 335 char msg[MSN_BUF_LEN];
336 336
343 user = tmp; 343 user = tmp;
344 344
345 GET_NEXT(tmp); 345 GET_NEXT(tmp);
346 friend = url_decode(tmp); 346 friend = url_decode(tmp);
347 347
348 if (g_strcasecmp(list, "RL")) 348 if (g_ascii_strcasecmp(list, "RL"))
349 return 1; 349 return 1;
350 350
351 while (perm) { 351 while (perm) {
352 if (!g_strcasecmp(perm->data, user)) 352 if (!gaim_utf8_strcasecmp(perm->data, user))
353 return 1; 353 return 1;
354 perm = perm->next; 354 perm = perm->next;
355 } 355 }
356 356
357 ap = g_new0(struct msn_add_permit, 1); 357 ap = g_new0(struct msn_add_permit, 1);
361 361
362 g_snprintf(msg, sizeof(msg), _("The user %s (%s) wants to add %s to his or her buddy list."), 362 g_snprintf(msg, sizeof(msg), _("The user %s (%s) wants to add %s to his or her buddy list."),
363 ap->user, ap->friend, ap->gc->username); 363 ap->user, ap->friend, ap->gc->username);
364 364
365 // do_ask_dialog(msg, NULL, ap, _("Authorize"), msn_accept_add, _("Deny"), msn_cancel_add, my_protocol->plug ? my_protocol->plug->handle : NULL, FALSE); 365 // do_ask_dialog(msg, NULL, ap, _("Authorize"), msn_accept_add, _("Deny"), msn_cancel_add, my_protocol->plug ? my_protocol->plug->handle : NULL, FALSE);
366 } else if (!g_strncasecmp(buf, "BLP", 3)) { 366 } else if (!g_ascii_strncasecmp(buf, "BLP", 3)) {
367 char *type, *tmp = buf; 367 char *type, *tmp = buf;
368 368
369 GET_NEXT(tmp); 369 GET_NEXT(tmp);
370 GET_NEXT(tmp); 370 GET_NEXT(tmp);
371 GET_NEXT(tmp); 371 GET_NEXT(tmp);
372 type = tmp; 372 type = tmp;
373 373
374 if (!g_strcasecmp(type, "AL")) { 374 if (!g_ascii_strcasecmp(type, "AL")) {
375 /* If the current setting is AL, messages 375 /* If the current setting is AL, messages
376 * from users who are not in BL will be delivered 376 * from users who are not in BL will be delivered
377 * 377 *
378 * In other words, deny some */ 378 * In other words, deny some */
379 gc->account->permdeny = DENY_SOME; 379 gc->account->permdeny = DENY_SOME;
383 * delivered. 383 * delivered.
384 * 384 *
385 * In other words, permit some */ 385 * In other words, permit some */
386 gc->account->permdeny = PERMIT_SOME; 386 gc->account->permdeny = PERMIT_SOME;
387 } 387 }
388 } else if (!g_strncasecmp(buf, "BPR", 3)) { 388 } else if (!g_ascii_strncasecmp(buf, "BPR", 3)) {
389 } else if (!g_strncasecmp(buf, "CHG", 3)) { 389 } else if (!g_ascii_strncasecmp(buf, "CHG", 3)) {
390 } else if (!g_strncasecmp(buf, "CHL", 3)) { 390 } else if (!g_ascii_strncasecmp(buf, "CHL", 3)) {
391 char *hash = buf; 391 char *hash = buf;
392 char buf2[MSN_BUF_LEN]; 392 char buf2[MSN_BUF_LEN];
393 md5_state_t st; 393 md5_state_t st;
394 md5_byte_t di[16]; 394 md5_byte_t di[16];
395 int i; 395 int i;
412 hide_login_progress(gc, _("Unable to write to server")); 412 hide_login_progress(gc, _("Unable to write to server"));
413 signoff(gc); 413 signoff(gc);
414 } 414 }
415 415
416 debug_printf("\n"); 416 debug_printf("\n");
417 } else if (!g_strncasecmp(buf, "FLN", 3)) { 417 } else if (!g_ascii_strncasecmp(buf, "FLN", 3)) {
418 char *usr = buf; 418 char *usr = buf;
419 419
420 GET_NEXT(usr); 420 GET_NEXT(usr);
421 serv_got_update(gc, usr, 0, 0, 0, 0, 0); 421 serv_got_update(gc, usr, 0, 0, 0, 0, 0);
422 } else if (!g_strncasecmp(buf, "GTC", 3)) { 422 } else if (!g_ascii_strncasecmp(buf, "GTC", 3)) {
423 } else if (!g_strncasecmp(buf, "INF", 3)) { 423 } else if (!g_ascii_strncasecmp(buf, "INF", 3)) {
424 } else if (!g_strncasecmp(buf, "ILN", 3)) { 424 } else if (!g_ascii_strncasecmp(buf, "ILN", 3)) {
425 char *state, *user, *friend, *tmp = buf; 425 char *state, *user, *friend, *tmp = buf;
426 int status = 0; 426 int status = 0;
427 427
428 GET_NEXT(tmp); 428 GET_NEXT(tmp);
429 429
436 GET_NEXT(tmp); 436 GET_NEXT(tmp);
437 friend = url_decode(tmp); 437 friend = url_decode(tmp);
438 438
439 serv_got_alias(gc, user, friend); 439 serv_got_alias(gc, user, friend);
440 440
441 if (!g_strcasecmp(state, "BSY")) { 441 if (!g_ascii_strcasecmp(state, "BSY")) {
442 status |= UC_UNAVAILABLE | (MSN_BUSY << 1); 442 status |= UC_UNAVAILABLE | (MSN_BUSY << 1);
443 } else if (!g_strcasecmp(state, "IDL")) { 443 } else if (!g_ascii_strcasecmp(state, "IDL")) {
444 status |= UC_UNAVAILABLE | (MSN_IDLE << 1); 444 status |= UC_UNAVAILABLE | (MSN_IDLE << 1);
445 } else if (!g_strcasecmp(state, "BRB")) { 445 } else if (!g_ascii_strcasecmp(state, "BRB")) {
446 status |= UC_UNAVAILABLE | (MSN_BRB << 1); 446 status |= UC_UNAVAILABLE | (MSN_BRB << 1);
447 } else if (!g_strcasecmp(state, "AWY")) { 447 } else if (!g_ascii_strcasecmp(state, "AWY")) {
448 status |= UC_UNAVAILABLE | (MSN_AWAY << 1); 448 status |= UC_UNAVAILABLE | (MSN_AWAY << 1);
449 } else if (!g_strcasecmp(state, "PHN")) { 449 } else if (!g_ascii_strcasecmp(state, "PHN")) {
450 status |= UC_UNAVAILABLE | (MSN_PHONE << 1); 450 status |= UC_UNAVAILABLE | (MSN_PHONE << 1);
451 } else if (!g_strcasecmp(state, "LUN")) { 451 } else if (!g_ascii_strcasecmp(state, "LUN")) {
452 status |= UC_UNAVAILABLE | (MSN_LUNCH << 1); 452 status |= UC_UNAVAILABLE | (MSN_LUNCH << 1);
453 } 453 }
454 454
455 serv_got_update(gc, user, 1, 0, 0, 0, status); 455 serv_got_update(gc, user, 1, 0, 0, 0, status);
456 } else if (!g_strncasecmp(buf, "LST", 3)) { 456 } else if (!g_ascii_strncasecmp(buf, "LST", 3)) {
457 char *which, *who, *friend, *tmp = buf; 457 char *which, *who, *friend, *tmp = buf;
458 struct msn_add_permit *ap; /* for any as yet undealt with buddies who've added you to their buddy list when you were off-line. How dare they! */ 458 struct msn_add_permit *ap; /* for any as yet undealt with buddies who've added you to their buddy list when you were off-line. How dare they! */
459 GSList *perm = gc->account->permit; /* current permit list */ 459 GSList *perm = gc->account->permit; /* current permit list */
460 GSList *denyl = gc->account->deny; 460 GSList *denyl = gc->account->deny;
461 char msg[MSN_BUF_LEN]; 461 char msg[MSN_BUF_LEN];
475 who = tmp; 475 who = tmp;
476 476
477 GET_NEXT(tmp); 477 GET_NEXT(tmp);
478 friend = url_decode(tmp); 478 friend = url_decode(tmp);
479 479
480 if (!g_strcasecmp(which, "FL") && pos) { 480 if (!g_ascii_strcasecmp(which, "FL") && pos) {
481 struct msn_buddy *b = g_new0(struct msn_buddy, 1); 481 struct msn_buddy *b = g_new0(struct msn_buddy, 1);
482 b->user = g_strdup(who); 482 b->user = g_strdup(who);
483 b->friend = g_strdup(friend); 483 b->friend = g_strdup(friend);
484 md->fl = g_slist_append(md->fl, b); 484 md->fl = g_slist_append(md->fl, b);
485 } else if (!g_strcasecmp(which, "AL") && pos) { 485 } else if (!g_ascii_strcasecmp(which, "AL") && pos) {
486 if (g_slist_find_custom(gc->account->deny, who, 486 if (g_slist_find_custom(gc->account->deny, who,
487 (GCompareFunc)strcmp)) { 487 (GCompareFunc)strcmp)) {
488 debug_printf("moving from deny to permit: %s", who); 488 debug_printf("moving from deny to permit: %s", who);
489 gaim_privacy_deny_remove(gc->account, who); 489 gaim_privacy_deny_remove(gc->account, who);
490 } 490 }
491 gaim_privacy_permit_add(gc->account, who); 491 gaim_privacy_permit_add(gc->account, who);
492 } else if (!g_strcasecmp(which, "BL") && pos) { 492 } else if (!g_ascii_strcasecmp(which, "BL") && pos) {
493 gaim_privacy_deny_add(gc->account, who); 493 gaim_privacy_deny_add(gc->account, who);
494 } else if (!g_strcasecmp(which, "RL")) { 494 } else if (!g_ascii_strcasecmp(which, "RL")) {
495 if (pos) { 495 if (pos) {
496 while(perm) { 496 while(perm) {
497 if(!g_strcasecmp(perm->data, who)) 497 if(!g_ascii_strcasecmp(perm->data, who))
498 new = 0; 498 new = 0;
499 perm = perm->next; 499 perm = perm->next;
500 } 500 }
501 while(denyl) { 501 while(denyl) {
502 if(!g_strcasecmp(denyl->data, who)) 502 if(!g_ascii_strcasecmp(denyl->data, who))
503 new = 0; 503 new = 0;
504 denyl = denyl->next; 504 denyl = denyl->next;
505 } 505 }
506 if(new) { 506 if(new) {
507 debug_printf("Unresolved MSN RL entry\n"); 507 debug_printf("Unresolved MSN RL entry\n");
550 g_free(mb->user); 550 g_free(mb->user);
551 g_free(mb->friend); 551 g_free(mb->friend);
552 g_free(mb); 552 g_free(mb);
553 } 553 }
554 } 554 }
555 } else if (!g_strncasecmp(buf, "MSG", 3)) { 555 } else if (!g_ascii_strncasecmp(buf, "MSG", 3)) {
556 char *user, *tmp = buf; 556 char *user, *tmp = buf;
557 int length; 557 int length;
558 558
559 GET_NEXT(tmp); 559 GET_NEXT(tmp);
560 user = tmp; 560 user = tmp;
565 length = atoi(tmp); 565 length = atoi(tmp);
566 566
567 md->msg = TRUE; 567 md->msg = TRUE;
568 md->msguser = g_strdup(user); 568 md->msguser = g_strdup(user);
569 md->msglen = length; 569 md->msglen = length;
570 } else if (!g_strncasecmp(buf, "NLN", 3)) { 570 } else if (!g_ascii_strncasecmp(buf, "NLN", 3)) {
571 char *state, *user, *friend, *tmp = buf; 571 char *state, *user, *friend, *tmp = buf;
572 int status = 0; 572 int status = 0;
573 573
574 GET_NEXT(tmp); 574 GET_NEXT(tmp);
575 state = tmp; 575 state = tmp;
580 GET_NEXT(tmp); 580 GET_NEXT(tmp);
581 friend = url_decode(tmp); 581 friend = url_decode(tmp);
582 582
583 serv_got_alias(gc, user, friend); 583 serv_got_alias(gc, user, friend);
584 584
585 if (!g_strcasecmp(state, "BSY")) { 585 if (!g_ascii_strcasecmp(state, "BSY")) {
586 status |= UC_UNAVAILABLE | (MSN_BUSY << 1); 586 status |= UC_UNAVAILABLE | (MSN_BUSY << 1);
587 } else if (!g_strcasecmp(state, "IDL")) { 587 } else if (!g_ascii_strcasecmp(state, "IDL")) {
588 status |= UC_UNAVAILABLE | (MSN_IDLE << 1); 588 status |= UC_UNAVAILABLE | (MSN_IDLE << 1);
589 } else if (!g_strcasecmp(state, "BRB")) { 589 } else if (!g_ascii_strcasecmp(state, "BRB")) {
590 status |= UC_UNAVAILABLE | (MSN_BRB << 1); 590 status |= UC_UNAVAILABLE | (MSN_BRB << 1);
591 } else if (!g_strcasecmp(state, "AWY")) { 591 } else if (!g_ascii_strcasecmp(state, "AWY")) {
592 status |= UC_UNAVAILABLE | (MSN_AWAY << 1); 592 status |= UC_UNAVAILABLE | (MSN_AWAY << 1);
593 } else if (!g_strcasecmp(state, "PHN")) { 593 } else if (!g_ascii_strcasecmp(state, "PHN")) {
594 status |= UC_UNAVAILABLE | (MSN_PHONE << 1); 594 status |= UC_UNAVAILABLE | (MSN_PHONE << 1);
595 } else if (!g_strcasecmp(state, "LUN")) { 595 } else if (!g_ascii_strcasecmp(state, "LUN")) {
596 status |= UC_UNAVAILABLE | (MSN_LUNCH << 1); 596 status |= UC_UNAVAILABLE | (MSN_LUNCH << 1);
597 } 597 }
598 598
599 serv_got_update(gc, user, 1, 0, 0, 0, status); 599 serv_got_update(gc, user, 1, 0, 0, 0, status);
600 } else if (!g_strncasecmp(buf, "OUT", 3)) { 600 } else if (!g_ascii_strncasecmp(buf, "OUT", 3)) {
601 char *tmp = buf; 601 char *tmp = buf;
602 602
603 GET_NEXT(tmp); 603 GET_NEXT(tmp);
604 if (!g_strncasecmp(tmp, "OTH", 3)) { 604 if (!g_ascii_strncasecmp(tmp, "OTH", 3)) {
605 hide_login_progress(gc, _("You have been disconnected. You have " 605 hide_login_progress(gc, _("You have been disconnected. You have "
606 "signed on from another location.")); 606 "signed on from another location."));
607 signoff(gc); 607 signoff(gc);
608 return 0; 608 return 0;
609 } 609 }
610 } else if (!g_strncasecmp(buf, "PRP", 3)) { 610 } else if (!g_ascii_strncasecmp(buf, "PRP", 3)) {
611 } else if (!g_strncasecmp(buf, "QNG", 3)) { 611 } else if (!g_ascii_strncasecmp(buf, "QNG", 3)) {
612 } else if (!g_strncasecmp(buf, "QRY", 3)) { 612 } else if (!g_ascii_strncasecmp(buf, "QRY", 3)) {
613 } else if (!g_strncasecmp(buf, "REA", 3)) { 613 } else if (!g_ascii_strncasecmp(buf, "REA", 3)) {
614 char *friend, *tmp = buf; 614 char *friend, *tmp = buf;
615 615
616 GET_NEXT(tmp); 616 GET_NEXT(tmp);
617 GET_NEXT(tmp); 617 GET_NEXT(tmp);
618 GET_NEXT(tmp); 618 GET_NEXT(tmp);
619 GET_NEXT(tmp); 619 GET_NEXT(tmp);
620 620
621 friend = url_decode(tmp); 621 friend = url_decode(tmp);
622 622
623 g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", friend); 623 g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", friend);
624 } else if (!g_strncasecmp(buf, "REM", 3)) { 624 } else if (!g_ascii_strncasecmp(buf, "REM", 3)) {
625 } else if (!g_strncasecmp(buf, "RNG", 3)) { 625 } else if (!g_ascii_strncasecmp(buf, "RNG", 3)) {
626 struct msn_switchboard *ms; 626 struct msn_switchboard *ms;
627 char *sessid, *ssaddr, *auth, *user; 627 char *sessid, *ssaddr, *auth, *user;
628 int port, i = 0; 628 int port, i = 0;
629 char *tmp = buf; 629 char *tmp = buf;
630 630
658 } 658 }
659 ms->user = g_strdup(user); 659 ms->user = g_strdup(user);
660 ms->sessid = g_strdup(sessid); 660 ms->sessid = g_strdup(sessid);
661 ms->auth = g_strdup(auth); 661 ms->auth = g_strdup(auth);
662 ms->gc = gc; 662 ms->gc = gc;
663 } else if (!g_strncasecmp(buf, "URL", 3)) { 663 } else if (!g_ascii_strncasecmp(buf, "URL", 3)) {
664 char *tmp = buf; 664 char *tmp = buf;
665 FILE *fd; 665 FILE *fd;
666 md5_state_t st; 666 md5_state_t st;
667 md5_byte_t di[16]; 667 md5_byte_t di[16];
668 int i; 668 int i;
740 } else 740 } else
741 g_free(tmp); 741 g_free(tmp);
742 } 742 }
743 } 743 }
744 } 744 }
745 } else if (!g_strncasecmp(buf, "SYN", 3)) { 745 } else if (!g_ascii_strncasecmp(buf, "SYN", 3)) {
746 } else if (!g_strncasecmp(buf, "USR", 3)) { 746 } else if (!g_ascii_strncasecmp(buf, "USR", 3)) {
747 } else if (!g_strncasecmp(buf, "XFR", 3)) { 747 } else if (!g_ascii_strncasecmp(buf, "XFR", 3)) {
748 char *host = strstr(buf, "SB"); 748 char *host = strstr(buf, "SB");
749 int port; 749 int port;
750 int i = 0; 750 int i = 0;
751 gboolean switchboard = TRUE; 751 gboolean switchboard = TRUE;
752 char *tmp; 752 char *tmp;
811 char *skiphead; 811 char *skiphead;
812 char *content; 812 char *content;
813 813
814 content = strstr(msg, "Content-Type: "); 814 content = strstr(msg, "Content-Type: ");
815 815
816 if ((content) && (!g_strncasecmp(content, "Content-Type: text/x-msmsgsprofile", 816 if ((content) && (!g_ascii_strncasecmp(content, "Content-Type: text/x-msmsgsprofile",
817 strlen("Content-Type: text/x-msmsgsprofile")))) { 817 strlen("Content-Type: text/x-msmsgsprofile")))) {
818 818
819 char *kv,*sid,*mspauth; 819 char *kv,*sid,*mspauth;
820 820
821 kv = strstr(msg, "kv: "); 821 kv = strstr(msg, "kv: ");
848 848
849 } 849 }
850 850
851 851
852 852
853 if (!g_strcasecmp(md->msguser, "hotmail")) { 853 if (!g_ascii_strcasecmp(md->msguser, "hotmail")) {
854 handle_hotmail(gc, msg); 854 handle_hotmail(gc, msg);
855 return; 855 return;
856 } 856 }
857 857
858 858
977 static int msn_process_login(struct gaim_connection *gc, char *buf) 977 static int msn_process_login(struct gaim_connection *gc, char *buf)
978 { 978 {
979 struct msn_data *md = gc->proto_data; 979 struct msn_data *md = gc->proto_data;
980 char sendbuf[MSN_BUF_LEN]; 980 char sendbuf[MSN_BUF_LEN];
981 981
982 if (!g_strncasecmp(buf, "VER", 3)) { 982 if (!g_ascii_strncasecmp(buf, "VER", 3)) {
983 /* we got VER, check to see that MSNP5 is in the list, then send INF */ 983 /* we got VER, check to see that MSNP5 is in the list, then send INF */
984 if (!strstr(buf, "MSNP5")) { 984 if (!strstr(buf, "MSNP5")) {
985 hide_login_progress(gc, _("Protocol not supported")); 985 hide_login_progress(gc, _("Protocol not supported"));
986 signoff(gc); 986 signoff(gc);
987 return 0; 987 return 0;
991 if (msn_write(md->fd, sendbuf, strlen(sendbuf)) < 0) { 991 if (msn_write(md->fd, sendbuf, strlen(sendbuf)) < 0) {
992 hide_login_progress(gc, _("Unable to request INF\n")); 992 hide_login_progress(gc, _("Unable to request INF\n"));
993 signoff(gc); 993 signoff(gc);
994 return 0; 994 return 0;
995 } 995 }
996 } else if (!g_strncasecmp(buf, "INF", 3)) { 996 } else if (!g_ascii_strncasecmp(buf, "INF", 3)) {
997 /* check to make sure we can use md5 */ 997 /* check to make sure we can use md5 */
998 if (!strstr(buf, "MD5")) { 998 if (!strstr(buf, "MD5")) {
999 hide_login_progress(gc, _("Unable to login using MD5")); 999 hide_login_progress(gc, _("Unable to login using MD5"));
1000 signoff(gc); 1000 signoff(gc);
1001 return 0; 1001 return 0;
1007 signoff(gc); 1007 signoff(gc);
1008 return 0; 1008 return 0;
1009 } 1009 }
1010 1010
1011 set_login_progress(gc, 3, _("Requesting to send password")); 1011 set_login_progress(gc, 3, _("Requesting to send password"));
1012 } else if (!g_strncasecmp(buf, "USR", 3)) { 1012 } else if (!g_ascii_strncasecmp(buf, "USR", 3)) {
1013 char *resp, *friend, *tmp = buf; 1013 char *resp, *friend, *tmp = buf;
1014 1014
1015 GET_NEXT(tmp); 1015 GET_NEXT(tmp);
1016 GET_NEXT(tmp); 1016 GET_NEXT(tmp);
1017 resp = tmp; 1017 resp = tmp;
1019 GET_NEXT(tmp); 1019 GET_NEXT(tmp);
1020 friend = url_decode(tmp); 1020 friend = url_decode(tmp);
1021 GET_NEXT(tmp); 1021 GET_NEXT(tmp);
1022 1022
1023 /* so here, we're either getting the challenge or the OK */ 1023 /* so here, we're either getting the challenge or the OK */
1024 if (!g_strcasecmp(resp, "OK")) { 1024 if (!g_ascii_strcasecmp(resp, "OK")) {
1025 g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", friend); 1025 g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", friend);
1026 1026
1027 g_snprintf(sendbuf, sizeof(sendbuf), "SYN %u 0\r\n", ++md->trId); 1027 g_snprintf(sendbuf, sizeof(sendbuf), "SYN %u 0\r\n", ++md->trId);
1028 if (msn_write(md->fd, sendbuf, strlen(sendbuf)) < 0) { 1028 if (msn_write(md->fd, sendbuf, strlen(sendbuf)) < 0) {
1029 hide_login_progress(gc, _("Unable to write")); 1029 hide_login_progress(gc, _("Unable to write"));
1032 } 1032 }
1033 1033
1034 gaim_input_remove(md->inpa); 1034 gaim_input_remove(md->inpa);
1035 md->inpa = gaim_input_add(md->fd, GAIM_INPUT_READ, msn_callback, gc); 1035 md->inpa = gaim_input_add(md->fd, GAIM_INPUT_READ, msn_callback, gc);
1036 return 0; 1036 return 0;
1037 } else if (!g_strcasecmp(resp, "MD5")) { 1037 } else if (!g_ascii_strcasecmp(resp, "MD5")) {
1038 char buf2[MSN_BUF_LEN]; 1038 char buf2[MSN_BUF_LEN];
1039 md5_state_t st; 1039 md5_state_t st;
1040 md5_byte_t di[16]; 1040 md5_byte_t di[16];
1041 int i; 1041 int i;
1042 1042
1059 return 0; 1059 return 0;
1060 } 1060 }
1061 1061
1062 set_login_progress(gc, 4, _("Password sent")); 1062 set_login_progress(gc, 4, _("Password sent"));
1063 } 1063 }
1064 } else if (!g_strncasecmp(buf, "XFR", 3)) { 1064 } else if (!g_ascii_strncasecmp(buf, "XFR", 3)) {
1065 char *host = strstr(buf, "NS"); 1065 char *host = strstr(buf, "NS");
1066 int port; 1066 int port;
1067 int i = 0; 1067 int i = 0;
1068 1068
1069 if (!host) { 1069 if (!host) {
1685 /* This is a broken blist entry. */ 1685 /* This is a broken blist entry. */
1686 return; 1686 return;
1687 1687
1688 while (l) { 1688 while (l) {
1689 struct msn_buddy *b = l->data; 1689 struct msn_buddy *b = l->data;
1690 if (!g_strcasecmp(who, b->user)) 1690 if (!gaim_utf8_strcasecmp(who, b->user))
1691 break; 1691 break;
1692 l = l->next; 1692 l = l->next;
1693 } 1693 }
1694 if (l) 1694 if (l)
1695 return; 1695 return;