Mercurial > pidgin
diff libpurple/protocols/oscar/oscar.c @ 28935:da49e136fb34
Move two logging statements from oscar.c to family_oservice.c so we
can stop passing a billion parameters around.
2 files changed, 22 insertions(+), 61 deletions(-)
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 02 Feb 2010 23:18:09 +0000 |
parents | 3a43e48c870e |
children | a538cb73f897 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c Tue Feb 02 23:11:35 2010 +0000 +++ b/libpurple/protocols/oscar/oscar.c Tue Feb 02 23:18:09 2010 +0000 @@ -190,7 +190,6 @@ static int purple_icon_parseicon (OscarData *, FlapConnection *, FlapFrame *, ...); static int oscar_icon_req (OscarData *, FlapConnection *, FlapFrame *, ...); static int purple_parse_msgack (OscarData *, FlapConnection *, FlapFrame *, ...); -static int purple_parse_ratechange (OscarData *, FlapConnection *, FlapFrame *, ...); static int purple_parse_evilnotify (OscarData *, FlapConnection *, FlapFrame *, ...); static int purple_parse_searcherror(OscarData *, FlapConnection *, FlapFrame *, ...); static int purple_parse_searchreply(OscarData *, FlapConnection *, FlapFrame *, ...); @@ -1526,7 +1525,6 @@ oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, 0x000f, purple_selfinfo, 0); oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, 0x001f, purple_memrequest, 0); oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, 0x0021, oscar_icon_req,0); - oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, SNAC_SUBTYPE_OSERVICE_RATECHANGE, purple_parse_ratechange, 0); oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, SNAC_SUBTYPE_OSERVICE_REDIRECT, purple_handle_redirect, 0); oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, SNAC_SUBTYPE_OSERVICE_MOTD, purple_parse_motd, 0); oscar_data_addhandler(od, SNAC_FAMILY_OSERVICE, SNAC_SUBTYPE_OSERVICE_EVIL, purple_parse_evilnotify, 0); @@ -3838,56 +3836,6 @@ return 1; } -static int purple_parse_ratechange(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) { - static const char *codes[5] = { - "invalid", - "change", - "warning", - "limit", - "limit cleared", - }; - va_list ap; - guint16 code, rateclass; - guint32 windowsize, clear, alert, limit, disconnect, currentavg, maxavg, delta; - guint8 dropping_snacs; - - va_start(ap, fr); - code = (guint16)va_arg(ap, unsigned int); - rateclass= (guint16)va_arg(ap, unsigned int); - windowsize = va_arg(ap, guint32); - clear = va_arg(ap, guint32); - alert = va_arg(ap, guint32); - limit = va_arg(ap, guint32); - disconnect = va_arg(ap, guint32); - currentavg = va_arg(ap, guint32); - maxavg = va_arg(ap, guint32); - delta = va_arg(ap, guint32); - dropping_snacs = (guint8)va_arg(ap, unsigned int); - va_end(ap); - - purple_debug_misc("oscar", - "rate %s (param ID 0x%04hx): curavg = %u, maxavg = %u, alert at %u, " - "clear warning at %u, limit at %u, disconnect at %u, delta is %u, dropping is %u (window size = %u)\n", - (code < 5) ? codes[code] : codes[0], - rateclass, - currentavg, maxavg, - alert, clear, - limit, disconnect, - delta, - dropping_snacs, - windowsize - ); - - if (code == AIM_RATE_CODE_LIMIT) - { - purple_debug_warning("oscar", _("The last action you attempted could not be " - "performed because you are over the rate limit. " - "Please wait 10 seconds and try again.\n")); - } - - return 1; -} - static int purple_parse_evilnotify(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) { #ifdef CRAZY_WARNING va_list ap;