Mercurial > pidgin.yaz
diff libpurple/protocols/oscar/family_icbm.c @ 28592:493f48f8d17f 2.6.2_jp
merged with im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 07 Sep 2009 20:39:36 +0900 |
parents | 0754698c49f4 8d5380556f12 |
children | 9d17b1c09193 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_icbm.c Thu Sep 03 16:58:48 2009 +0900 +++ b/libpurple/protocols/oscar/family_icbm.c Mon Sep 07 20:39:36 2009 +0900 @@ -1505,7 +1505,7 @@ /* Should this be ASCII -> UNICODE -> Custom */ static const guint16 charsetpri[] = { AIM_CHARSET_ASCII, /* ASCII first */ - AIM_CHARSET_CUSTOM, /* then ISO-8859-1 */ + AIM_CHARSET_LATIN_1, /* then ISO-8859-1 */ AIM_CHARSET_UNICODE, /* UNICODE as last resort */ }; static const int charsetpricount = 3; @@ -2753,7 +2753,7 @@ * and Purple 0.60 and newer. * */ -int aim_im_sendmtn(OscarData *od, guint16 type1, const char *bn, guint16 type2) +int aim_im_sendmtn(OscarData *od, guint16 channel, const char *bn, guint16 event) { FlapConnection *conn; ByteStream bs; @@ -2769,19 +2769,14 @@ snacid = aim_cachesnac(od, SNAC_FAMILY_ICBM, 0x0014, 0x0000, NULL, 0); - /* - * 8 days of light - * Er, that is to say, 8 bytes of 0's - */ - byte_stream_put16(&bs, 0x0000); - byte_stream_put16(&bs, 0x0000); - byte_stream_put16(&bs, 0x0000); - byte_stream_put16(&bs, 0x0000); + /* ICBM cookie */ + byte_stream_put32(&bs, 0x00000000); + byte_stream_put32(&bs, 0x00000000); /* - * Type 1 (should be 0x0001 for mtn) + * Channel (should be 0x0001 for mtn) */ - byte_stream_put16(&bs, type1); + byte_stream_put16(&bs, channel); /* * Dest buddy name @@ -2790,9 +2785,9 @@ byte_stream_putstr(&bs, bn); /* - * Type 2 (should be 0x0000, 0x0001, or 0x0002 for mtn) + * Event (should be 0x0000, 0x0001, or 0x0002 for mtn) */ - byte_stream_put16(&bs, type2); + byte_stream_put16(&bs, event); flap_connection_send_snac(od, conn, SNAC_FAMILY_ICBM, 0x0014, 0x0000, snacid, &bs); @@ -2814,16 +2809,16 @@ aim_rxcallback_t userfunc; char *bn; guint8 bnlen; - guint16 type1, type2; - - byte_stream_advance(bs, 8); /* Unknown - All 0's */ - type1 = byte_stream_get16(bs); + guint16 channel, event; + + byte_stream_advance(bs, 8); /* ICBM cookie */ + channel = byte_stream_get16(bs); bnlen = byte_stream_get8(bs); bn = byte_stream_getstr(bs, bnlen); - type2 = byte_stream_get16(bs); + event = byte_stream_get16(bs); if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) - ret = userfunc(od, conn, frame, type1, bn, type2); + ret = userfunc(od, conn, frame, channel, bn, event); g_free(bn);