Mercurial > pidgin.yaz
diff src/protocols/oscar/chat.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 | 04dc7fe68889 |
line wrap: on
line diff
--- a/src/protocols/oscar/chat.c Wed Jun 11 22:46:38 2003 +0000 +++ b/src/protocols/oscar/chat.c Thu Jun 12 03:27:58 2003 +0000 @@ -335,7 +335,7 @@ aim_bstream_init(&occbs, tmptlv->value, tmptlv->length); while (curoccupant < usercount) - aim_extractuserinfo(sess, &occbs, &userinfo[curoccupant++]); + aim_info_extract(sess, &occbs, &userinfo[curoccupant++]); } /* @@ -413,11 +413,11 @@ if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) { ret = userfunc(sess, - rx, + rx, &roominfo, roomname, usercount, - userinfo, + userinfo, roomdesc, flags, creationtime, @@ -428,6 +428,10 @@ } free(roominfo.name); + + while (usercount > 0) + aim_info_free(&userinfo[--usercount]); + free(userinfo); free(roomname); free(roomdesc); @@ -446,12 +450,13 @@ while (aim_bstream_empty(bs)) { curcount++; userinfo = realloc(userinfo, curcount * sizeof(aim_userinfo_t)); - aim_extractuserinfo(sess, bs, &userinfo[curcount-1]); + aim_info_extract(sess, bs, &userinfo[curcount-1]); } if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) ret = userfunc(sess, rx, curcount, userinfo); + aim_info_free(userinfo); free(userinfo); return ret; @@ -625,7 +630,7 @@ userinfotlv = aim_gettlv(otl, 0x0003, 1); aim_bstream_init(&tbs, userinfotlv->value, userinfotlv->length); - aim_extractuserinfo(sess, &tbs, &userinfo); + aim_info_extract(sess, &tbs, &userinfo); } /* @@ -659,6 +664,7 @@ if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) ret = userfunc(sess, rx, &userinfo, msg); + aim_info_free(&userinfo); free(cookie); free(msg); aim_freetlvchain(&otl);