Mercurial > pidgin
comparison libpurple/protocols/oscar/oscar.c @ 28490:45583f271c02
oscar: Update the rate calculations based on OSCAR docs.
Another patch from Aman "tmm1" Gupta.
committer: Paul Aurich <paul@darkrain42.org>
author | aman@tmm1.net |
---|---|
date | Tue, 03 Nov 2009 05:53:06 +0000 |
parents | 05fd23db0a68 |
children | 28d73d34d792 |
comparison
equal
deleted
inserted
replaced
28489:05fd23db0a68 | 28490:45583f271c02 |
---|---|
3738 "limit", | 3738 "limit", |
3739 "limit cleared", | 3739 "limit cleared", |
3740 }; | 3740 }; |
3741 va_list ap; | 3741 va_list ap; |
3742 guint16 code, rateclass; | 3742 guint16 code, rateclass; |
3743 guint32 windowsize, clear, alert, limit, disconnect, currentavg, maxavg; | 3743 guint32 windowsize, clear, alert, limit, disconnect, currentavg, maxavg, delta; |
3744 guint8 dropping_snacs; | |
3744 | 3745 |
3745 va_start(ap, fr); | 3746 va_start(ap, fr); |
3746 code = (guint16)va_arg(ap, unsigned int); | 3747 code = (guint16)va_arg(ap, unsigned int); |
3747 rateclass= (guint16)va_arg(ap, unsigned int); | 3748 rateclass= (guint16)va_arg(ap, unsigned int); |
3748 windowsize = va_arg(ap, guint32); | 3749 windowsize = va_arg(ap, guint32); |
3750 alert = va_arg(ap, guint32); | 3751 alert = va_arg(ap, guint32); |
3751 limit = va_arg(ap, guint32); | 3752 limit = va_arg(ap, guint32); |
3752 disconnect = va_arg(ap, guint32); | 3753 disconnect = va_arg(ap, guint32); |
3753 currentavg = va_arg(ap, guint32); | 3754 currentavg = va_arg(ap, guint32); |
3754 maxavg = va_arg(ap, guint32); | 3755 maxavg = va_arg(ap, guint32); |
3756 delta = va_arg(ap, guint32); | |
3757 dropping_snacs = (guint8)va_arg(ap, unsigned int); | |
3755 va_end(ap); | 3758 va_end(ap); |
3756 | 3759 |
3757 purple_debug_misc("oscar", | 3760 purple_debug_misc("oscar", |
3758 "rate %s (param ID 0x%04hx): curavg = %u, maxavg = %u, alert at %u, " | 3761 "rate %s (param ID 0x%04hx): curavg = %u, maxavg = %u, alert at %u, " |
3759 "clear warning at %u, limit at %u, disconnect at %u (window size = %u)\n", | 3762 "clear warning at %u, limit at %u, disconnect at %u, delta is %u, dropping is %u (window size = %u)\n", |
3760 (code < 5) ? codes[code] : codes[0], | 3763 (code < 5) ? codes[code] : codes[0], |
3761 rateclass, | 3764 rateclass, |
3762 currentavg, maxavg, | 3765 currentavg, maxavg, |
3763 alert, clear, | 3766 alert, clear, |
3764 limit, disconnect, | 3767 limit, disconnect, |
3765 windowsize); | 3768 delta, |
3769 dropping_snacs, | |
3770 windowsize | |
3771 ); | |
3766 | 3772 |
3767 if (code == AIM_RATE_CODE_LIMIT) | 3773 if (code == AIM_RATE_CODE_LIMIT) |
3768 { | 3774 { |
3769 purple_debug_warning("oscar", _("The last action you attempted could not be " | 3775 purple_debug_warning("oscar", _("The last action you attempted could not be " |
3770 "performed because you are over the rate limit. " | 3776 "performed because you are over the rate limit. " |
3771 "Please wait 10 seconds and try again.")); | 3777 "Please wait 10 seconds and try again.\n")); |
3772 } | 3778 } |
3773 | 3779 |
3774 return 1; | 3780 return 1; |
3775 } | 3781 } |
3776 | 3782 |