- p->_log(3, 0, p->get_id_by_session(data->s), data->s->tunnel, " Throttling user\n");
- data->s->throttle_in = data->s->throttle_out = config->rl_rate;
+ unsigned long *rate = p->getconfig("throttle_speed", UNSIGNED_LONG);
+ if (rate)
+ {
+ if (*rate)
+ p->log(3, 0, p->get_id_by_session(data->s), data->s->tunnel, " Throttling user to %dkb/s\n", *rate);
+ else
+ p->log(3, 0, p->get_id_by_session(data->s), data->s->tunnel, " Not throttling user (throttle_speed=0)\n");
+
+ data->s->throttle_in = data->s->throttle_out = *rate;
+ }
+ else
+ p->log(1, 0, p->get_id_by_session(data->s), data->s->tunnel, "Not throttling user (can't get throttle_speed)\n");