Mercurial > pidgin
changeset 4871:0b64f386a7b8
[gaim-migrate @ 5201]
Nathan is SO the man. He pointed out that oscar was leaking about
500k per IM. No, just kidding. But this should help Gaim leak a
little less. It was all Nathan. He is so S-M-R-T.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 23 Mar 2003 07:59:17 +0000 |
parents | 773135edda4a |
children | e6dbac19a8d5 |
files | src/protocols/oscar/admin.c src/protocols/oscar/buddylist.c src/protocols/oscar/email.c src/protocols/oscar/newsearch.c src/protocols/oscar/service.c src/protocols/oscar/stats.c |
diffstat | 6 files changed, 34 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/admin.c Sun Mar 23 07:38:55 2003 +0000 +++ b/src/protocols/oscar/admin.c Sun Mar 23 07:59:17 2003 +0000 @@ -196,6 +196,7 @@ */ static int accountconfirm(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; fu16_t status; aim_tlvlist_t *tl; @@ -206,9 +207,9 @@ tl = aim_readtlvchain(bs); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, status); + ret = userfunc(sess, rx, status); - return 0; + 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)
--- a/src/protocols/oscar/buddylist.c Sun Mar 23 07:38:55 2003 +0000 +++ b/src/protocols/oscar/buddylist.c Sun Mar 23 07:59:17 2003 +0000 @@ -241,15 +241,16 @@ */ static int buddychange(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { + int ret = 0; aim_userinfo_t userinfo; aim_rxcallback_t userfunc; aim_extractuserinfo(sess, bs, &userinfo); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, &userinfo); + ret = userfunc(sess, rx, &userinfo); - return 0; + 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)
--- a/src/protocols/oscar/email.c Sun Mar 23 07:38:55 2003 +0000 +++ b/src/protocols/oscar/email.c Sun Mar 23 07:59:17 2003 +0000 @@ -74,6 +74,7 @@ */ static int parseinfo(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; struct aim_emailinfo *new; aim_tlvlist_t *tlvlist; @@ -125,9 +126,9 @@ new->flag = aim_gettlv16(tlvlist, 0x0084, 1); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, new, havenewmail); + ret = userfunc(sess, rx, new, havenewmail); - return 0; + return ret; } /**
--- a/src/protocols/oscar/newsearch.c Sun Mar 23 07:38:55 2003 +0000 +++ b/src/protocols/oscar/newsearch.c Sun Mar 23 07:59:17 2003 +0000 @@ -159,6 +159,7 @@ */ static int parseresults(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; fu16_t tmp, numresults; struct aim_usersearch *results = NULL; @@ -194,7 +195,7 @@ } if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, results); + ret = userfunc(sess, rx, results); /* Now free everything from above */ while (results) { @@ -217,7 +218,7 @@ free(del); } - return 0; + 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)
--- a/src/protocols/oscar/service.c Sun Mar 23 07:38:55 2003 +0000 +++ b/src/protocols/oscar/service.c Sun Mar 23 07:59:17 2003 +0000 @@ -392,6 +392,7 @@ /* Subtype 0x000a - Rate Change */ static int ratechange(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; fu16_t code, rateclass; fu32_t currentavg, maxavg, windowsize, clear, alert, limit, disconnect; @@ -408,9 +409,9 @@ maxavg = aimbs_get32(bs); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, code, rateclass, windowsize, clear, alert, limit, disconnect, currentavg, maxavg); + ret = userfunc(sess, rx, code, rateclass, windowsize, clear, alert, limit, disconnect, currentavg, maxavg); - return 0; + return ret; } /* @@ -429,12 +430,13 @@ /* Subtype 0x000b - Service Pause */ static int serverpause(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; if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx); + ret = userfunc(sess, rx); - return 0; + return ret; } /* @@ -477,12 +479,13 @@ /* Subtype 0x000d - Service Resume */ static int serverresume(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; if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx); + ret = userfunc(sess, rx); - return 0; + return ret; } /* Subtype 0x000e - Request self-info */ @@ -494,20 +497,22 @@ /* Subtype 0x000f - Self User Info */ static int selfinfo(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; aim_userinfo_t userinfo; aim_extractuserinfo(sess, bs, &userinfo); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, &userinfo); + ret = userfunc(sess, rx, &userinfo); - return 0; + return ret; } /* Subtype 0x0010 - Evil Notification */ static int evilnotify(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; fu16_t newevil; aim_userinfo_t userinfo; @@ -520,9 +525,9 @@ aim_extractuserinfo(sess, bs, &userinfo); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, newevil, &userinfo); + ret = userfunc(sess, rx, newevil, &userinfo); - return 0; + return ret; } /* @@ -796,6 +801,7 @@ /* Subtype 0x001f - Client verification */ static int memrequest(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; fu32_t offset, len; aim_tlvlist_t *list; @@ -810,12 +816,12 @@ faimdprintf(sess, 1, "data at 0x%08lx (%d bytes) of requested\n", offset, len, modname ? modname : "aim.exe"); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, offset, len, modname); + ret = userfunc(sess, rx, offset, len, modname); free(modname); aim_freetlvchain(&list); - return 0; + return ret; } #if 0
--- a/src/protocols/oscar/stats.c Sun Mar 23 07:38:55 2003 +0000 +++ b/src/protocols/oscar/stats.c Sun Mar 23 07:59:17 2003 +0000 @@ -8,15 +8,16 @@ static int reportinterval(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; fu16_t interval; - aim_rxcallback_t userfunc; interval = aimbs_get16(bs); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - return userfunc(sess, rx, interval); + ret = userfunc(sess, rx, interval); - return 0; + 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)