comparison src/protocols/oscar/locate.c @ 12307:cfffd6fdb073

[gaim-migrate @ 14611] fix sf bug #1371184, AIM Triton and Away/Available Messages "When a AIM Triton buddy returns from away, Gaim takes that away message and calls it a Available message." Ah, the joys of a closed protocol. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 03 Dec 2005 19:59:26 +0000
parents bcd7bd6a42dd
children 2a1961c1a345
comparison
equal deleted inserted replaced
12306:5907fb1e58a0 12307:cfffd6fdb073
754 } else 754 } else
755 aim_bstream_advance(bs, length2); 755 aim_bstream_advance(bs, length2);
756 } break; 756 } break;
757 757
758 case 0x0002: { /* An available message */ 758 case 0x0002: { /* An available message */
759 free(outinfo->avail);
760 free(outinfo->avail_encoding);
759 if (length2 >= 4) { 761 if (length2 >= 4) {
760 free(outinfo->avail);
761 outinfo->avail_len = aimbs_get16(bs); 762 outinfo->avail_len = aimbs_get16(bs);
762 outinfo->avail = aimbs_getstr(bs, outinfo->avail_len); 763 outinfo->avail = aimbs_getstr(bs, outinfo->avail_len);
763 if (aimbs_get16(bs) == 0x0001) { /* We have an encoding */ 764 if (aimbs_get16(bs) == 0x0001) { /* We have an encoding */
764 aimbs_get16(bs); 765 aimbs_get16(bs);
765 outinfo->avail_encoding = aimbs_getstr(bs, aimbs_get16(bs)); 766 outinfo->avail_encoding = aimbs_getstr(bs, aimbs_get16(bs));
766 } else { 767 } else {
767 /* No explicit encoding, client should use UTF-8 */ 768 /* No explicit encoding, client should use UTF-8 */
768 outinfo->avail_encoding = NULL; 769 outinfo->avail_encoding = NULL;
769 } 770 }
770 } else 771 } else {
771 aim_bstream_advance(bs, length2); 772 aim_bstream_advance(bs, length2);
773 outinfo->avail_len = 0;
774 outinfo->avail = g_strdup("");
775 outinfo->avail_encoding = NULL;
776 }
772 } break; 777 } break;
773 778
774 default: { 779 default: {
775 aim_bstream_advance(bs, length2); 780 aim_bstream_advance(bs, length2);
776 } break; 781 } break;