diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-02-13 01:14:43 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-02-13 01:14:43 +0300 |
commit | d7efa14d50976995b1e6c8b43f0a110767bf7661 (patch) | |
tree | fc7ae1eec125f13dc3c370181d36cce6b9d4c59b | |
parent | 04dafabeda3a05145173a6dadc869ad5b3aeadd7 (diff) | |
parent | a2fe6bb78b048a0214a2c3e02e26105179ec4c3a (diff) | |
download | accel-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.c | 11 |
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) |