summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2011-02-13 01:14:43 +0300
committerDmitry Kozlov <xeb@mail.ru>2011-02-13 01:14:43 +0300
commitd7efa14d50976995b1e6c8b43f0a110767bf7661 (patch)
treefc7ae1eec125f13dc3c370181d36cce6b9d4c59b
parent04dafabeda3a05145173a6dadc869ad5b3aeadd7 (diff)
parenta2fe6bb78b048a0214a2c3e02e26105179ec4c3a (diff)
downloadaccel-ppp-d7efa14d50976995b1e6c8b43f0a110767bf7661.tar.gz
accel-ppp-d7efa14d50976995b1e6c8b43f0a110767bf7661.zip
Merge branch 'master' of ssh://accel-ppp.git.sourceforge.net/gitroot/accel-ppp/accel-ppp
-rw-r--r--accel-pppd/extra/shaper_tbf.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/accel-pppd/extra/shaper_tbf.c b/accel-pppd/extra/shaper_tbf.c
index cc0ff22d..7ea48d0d 100644
--- a/accel-pppd/extra/shaper_tbf.c
+++ b/accel-pppd/extra/shaper_tbf.c
@@ -818,13 +818,18 @@ static void shaper_change_help(char * const *f, int f_cnt, void *cli)
static void shaper_change(struct shaper_pd_t *pd)
{
- if ((pd->temp_down_speed && pd->temp_up_speed) || (pd->down_speed && pd->up_speed))
+ if (pd->down_speed && pd->up_speed)
remove_shaper(pd->ppp->ifname);
- if (pd->temp_down_speed && pd->temp_up_speed)
+ if (pd->temp_down_speed && pd->temp_up_speed) {
+ pd->down_speed = pd->temp_down_speed;
+ pd->up_speed = pd->temp_up_speed;
install_shaper(pd->ppp->ifname, pd->temp_down_speed, 0, pd->temp_up_speed, 0);
- else if (pd->down_speed && pd->up_speed)
+ } else if (pd->cur_tr->down_speed && pd->cur_tr->up_speed) {
+ pd->down_speed = pd->cur_tr->down_speed;
+ pd->up_speed = pd->cur_tr->up_speed;
install_shaper(pd->ppp->ifname, pd->cur_tr->down_speed, pd->cur_tr->down_burst, pd->cur_tr->up_speed, pd->cur_tr->up_burst);
+ }
}
static int shaper_change_exec(const char *cmd, char * const *f, int f_cnt, void *cli)