comparison libpurple/protocols/oscar/family_locate.c @ 30831:be056399ae5f

Fixes #12044. We send a dummy packet with DC version = 8 to make Miranda and QIP think we come from a respectable family and deserve being sent channel 2 messages (which we now treat as plain text). Also, we now send HTML_MSGS capability to convince Trillian to not strip HTML before sending us messages.
author ivan.komarov@soc.pidgin.im
date Thu, 05 Aug 2010 21:19:47 +0000
parents bbb27d65681f
children 11c54d781835
comparison
equal deleted inserted replaced
30830:1f3ef11a9690 30831:be056399ae5f
242 0xb2, 0x35, 0x36, 0x79, 0x8b, 0xdf, 0x00, 0x00}}, 242 0xb2, 0x35, 0x36, 0x79, 0x8b, 0xdf, 0x00, 0x00}},
243 243
244 {OSCAR_CAPABILITY_EMPTY, 244 {OSCAR_CAPABILITY_EMPTY,
245 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 245 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
246 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, 246 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
247
248 {OSCAR_CAPABILITY_HTML_MSGS,
249 {0x01, 0x38, 0xca, 0x7b, 0x76, 0x9a, 0x49, 0x15,
250 0x88, 0xf2, 0x13, 0xfc, 0x00, 0x97, 0x9e, 0xa8}},
247 251
248 {OSCAR_CAPABILITY_LAST, 252 {OSCAR_CAPABILITY_LAST,
249 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 253 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, 254 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
251 }; 255 };
673 677
674 if (!bs) 678 if (!bs)
675 return -EINVAL; 679 return -EINVAL;
676 680
677 for (i = 0; byte_stream_bytes_left(bs); i++) { 681 for (i = 0; byte_stream_bytes_left(bs); i++) {
678
679 if (aim_caps[i].flag == OSCAR_CAPABILITY_LAST) 682 if (aim_caps[i].flag == OSCAR_CAPABILITY_LAST)
680 break; 683 break;
681 684
682 if (caps & aim_caps[i].flag) 685 if (caps & aim_caps[i].flag)
683 byte_stream_putraw(bs, aim_caps[i].data, 0x10); 686 byte_stream_putraw(bs, aim_caps[i].data, 0x10);
684 687 }
685 }
686
687 return 0; 688 return 0;
688 } 689 }
689 690
690 #ifdef LOG_UNKNOWN_TLV 691 #ifdef LOG_UNKNOWN_TLV
691 static void 692 static void