Mercurial > pidgin.yaz
diff src/protocols/oscar/chat.c @ 4901:ad589b887af9
[gaim-migrate @ 5235]
Aside from shifting lots of stuff around in aim.h, mostly just
to annoy people because everything in the oscar directory will
recompile, I took out a few calls to aimutil_getbleh and
aimutil_putbleh in favor of other methods. These functions
should be used aaas little as possible because, um, well mid
said so in his comments, I think.
The only real change is a fix for bug 710933, which says that
"Web Aware" is not set at signon, it is only set when you
explicitly set your status to anything. Also, the I think the
interoperability flag changes how privacy/invisibility in ICQ
works, and I'm not really sure if it's good or not. I think
it's more like AIM, but I'm too tired to figure out what that
means.
http://sourceforge.net/tracker/index.php?func=detail&aid=710993&group_id=235&atid=100235
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 28 Mar 2003 06:37:21 +0000 |
parents | 2532f1192da3 |
children | 09f7f23dc83a |
line wrap: on
line diff
--- a/src/protocols/oscar/chat.c Thu Mar 27 22:29:45 2003 +0000 +++ b/src/protocols/oscar/chat.c Fri Mar 28 06:37:21 2003 +0000 @@ -204,12 +204,11 @@ snacid = aim_cachesnac(sess, 0x0004, 0x0006, 0x0000, sn, strlen(sn)+1); aim_putsnac(&fr->data, 0x0004, 0x0006, 0x0000, snacid); - /* * Cookie */ - for (i = 0; i < sizeof(ckstr); i++) - aimutil_put8(ckstr, (fu8_t) rand()); + for (i = 0; i < 8; i++) + ckstr[i] = (fu8_t)rand(); /* XXX should be uncached by an unwritten 'invite accept' handler */ if ((priv = malloc(sizeof(struct aim_invite_priv)))) { @@ -224,20 +223,11 @@ else free(priv); - for (i = 0; i < sizeof(ckstr); i++) - aimbs_put8(&fr->data, ckstr[i]); - - - /* - * Channel (2) - */ - aimbs_put16(&fr->data, 0x0002); - - /* - * Dest sn - */ - aimbs_put8(&fr->data, strlen(sn)); - aimbs_putraw(&fr->data, sn, strlen(sn)); + /* ICBM Header */ + aimbs_putraw(&fr->data, ckstr, 8); /* Cookie */ + aimbs_put16(&fr->data, 0x0002); /* Channel */ + aimbs_put8(&fr->data, strlen(sn)); /* Screename length */ + aimbs_putraw(&fr->data, sn, strlen(sn)); /* Screenname */ /* * TLV t(0005) @@ -497,31 +487,23 @@ snacid = aim_cachesnac(sess, 0x000e, 0x0005, 0x0000, NULL, 0); aim_putsnac(&fr->data, 0x000e, 0x0005, 0x0000, snacid); - - /* - * Generate a random message cookie. + /* + * Cookie * * XXX mkcookie should generate the cookie and cache it in one * operation to preserve uniqueness. - * */ - for (i = 0; i < sizeof(ckstr); i++) - aimutil_put8(ckstr+i, (fu8_t) rand()); + for (i = 0; i < 8; i++) + ckstr[i] = (fu8_t)rand(); cookie = aim_mkcookie(ckstr, AIM_COOKIETYPE_CHAT, NULL); cookie->data = NULL; /* XXX store something useful here */ aim_cachecookie(sess, cookie); - for (i = 0; i < sizeof(ckstr); i++) - aimbs_put8(&fr->data, ckstr[i]); - - - /* - * Channel ID. - */ - aimbs_put16(&fr->data, 0x0003); - + /* ICBM Header */ + aimbs_putraw(&fr->data, ckstr, 8); /* Cookie */ + aimbs_put16(&fr->data, 0x0003); /* Channel */ /* * Type 1: Flag meaning this message is destined to the room.