Mercurial > pidgin.yaz
diff src/protocols/oscar/service.c @ 5836:09f7f23dc83a
[gaim-migrate @ 6267]
I think I've fixed the negative online time for real, now. Or, at least
reduced the frequency of it happening. Also added the ability to see
iChat's "available" messages.
Sean, I ended up changing more than I thought I would have to, but that's
partially because I like to change things a lot.
If it conflicts or whatever feel free to back it out and I can re-patch it
back in when you're done with your stuff.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 12 Jun 2003 03:27:58 +0000 |
parents | ad589b887af9 |
children | a48c338dff6c |
line wrap: on
line diff
--- a/src/protocols/oscar/service.c Wed Jun 11 22:46:38 2003 +0000 +++ b/src/protocols/oscar/service.c Thu Jun 12 03:27:58 2003 +0000 @@ -501,11 +501,13 @@ aim_rxcallback_t userfunc; aim_userinfo_t userinfo; - aim_extractuserinfo(sess, bs, &userinfo); + aim_info_extract(sess, bs, &userinfo); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) ret = userfunc(sess, rx, &userinfo); + aim_info_free(&userinfo); + return ret; } @@ -522,11 +524,13 @@ newevil = aimbs_get16(bs); if (aim_bstream_empty(bs)) - aim_extractuserinfo(sess, bs, &userinfo); + aim_info_extract(sess, bs, &userinfo); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) ret = userfunc(sess, rx, newevil, &userinfo); + aim_info_free(&userinfo); + return ret; } @@ -938,6 +942,30 @@ return 0; } +/* + * Subtype 0x0021 - Receive our extended status + * + * This is used for MAC non-away "away" messages, and maybe ICQ extended status messages? + */ +static int aim_parse_extstatus(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) +{ + int ret = 0; + aim_rxcallback_t userfunc; + char *msg = NULL; + fu16_t id; + + aimbs_get16(bs); /* 0x0002 */ + aimbs_get16(bs); /* 0x0404 or 0x0407? Maybe 0x04 and then a length? */ + msg = aimbs_getstr(bs, aimbs_get16(bs)); + + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) + ret = userfunc(sess, rx, msg); + + free(msg); + + return ret; +} + static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { @@ -965,6 +993,8 @@ return hostversions(sess, mod, rx, snac, bs); else if (snac->subtype == 0x001f) return memrequest(sess, mod, rx, snac, bs); + else if (snac->subtype == 0x0021) + return aim_parse_extstatus(sess, mod, rx, snac, bs); return 0; }