# HG changeset patch # User Mark Doliner # Date 1165049795 0 # Node ID 337dfc40a5389362ed61c63c83dd7b32cabce75e # Parent eed75cc6cb888113072deefed46f1dd330e577d0 [gaim-migrate @ 17873] Update our current rate information stuff when the server slaps us on the wrist for sending SNACs too rapidly committer: Tailor Script diff -r eed75cc6cb88 -r 337dfc40a538 libgaim/protocols/oscar/family_oservice.c --- a/libgaim/protocols/oscar/family_oservice.c Sat Dec 02 08:37:24 2006 +0000 +++ b/libgaim/protocols/oscar/family_oservice.c Sat Dec 02 08:56:35 2006 +0000 @@ -430,22 +430,27 @@ { int ret = 0; aim_rxcallback_t userfunc; - guint16 code, rateclass; - guint32 currentavg, maxavg, windowsize, clear, alert, limit, disconnect; + guint16 code, classid; + struct rateclass *rateclass; code = byte_stream_get16(bs); - rateclass = byte_stream_get16(bs); + classid = byte_stream_get16(bs); + + rateclass = rateclass_find(conn->rateclasses, classid); + if (rateclass == NULL) + /* This should never really happen */ + return 0; - windowsize = byte_stream_get32(bs); - clear = byte_stream_get32(bs); - alert = byte_stream_get32(bs); - limit = byte_stream_get32(bs); - disconnect = byte_stream_get32(bs); - currentavg = byte_stream_get32(bs); - maxavg = byte_stream_get32(bs); + rateclass->windowsize = byte_stream_get32(bs); + rateclass->clear = byte_stream_get32(bs); + rateclass->alert = byte_stream_get32(bs); + rateclass->limit = byte_stream_get32(bs); + rateclass->disconnect = byte_stream_get32(bs); + rateclass->current = byte_stream_get32(bs); + rateclass->max = byte_stream_get32(bs); if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) - ret = userfunc(od, conn, frame, code, rateclass, windowsize, clear, alert, limit, disconnect, currentavg, maxavg); + ret = userfunc(od, conn, frame, code, classid, rateclass->windowsize, rateclass->clear, rateclass->alert, rateclass->limit, rateclass->disconnect, rateclass->current, rateclass->max); return ret; }