summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2011-04-25 17:59:46 +0400
committerKozlov Dmitry <dima@server>2011-04-25 17:59:46 +0400
commit2dbb0397c7371ad55f6c90fe0fbe305058a39a09 (patch)
tree606896c47ad2c44c2b1dd60c3c563d1a50c8b9a2 /accel-pppd
parent41d5523718f27a71500c99fdf642f48d3d9aa937 (diff)
downloadaccel-ppp-2dbb0397c7371ad55f6c90fe0fbe305058a39a09.tar.gz
accel-ppp-2dbb0397c7371ad55f6c90fe0fbe305058a39a09.zip
shaper_tbf: fixed bug of incorrect operation when time ranges are spicified and connection whithout time range identifier is arrived
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/extra/shaper_tbf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/extra/shaper_tbf.c b/accel-pppd/extra/shaper_tbf.c
index 7ea48d0..c276869 100644
--- a/accel-pppd/extra/shaper_tbf.c
+++ b/accel-pppd/extra/shaper_tbf.c
@@ -87,7 +87,7 @@ struct time_range_t
static void *pd_key;
static LIST_HEAD(time_range_list);
-static int time_range_id;
+static int time_range_id = 0;
static void shaper_ctx_close(struct triton_context_t *);
static struct triton_context_t shaper_ctx = {
@@ -619,7 +619,7 @@ static struct time_range_pd_t *get_tr_pd(struct shaper_pd_t *pd, int id)
memset(tr_pd, 0, sizeof(*tr_pd));
tr_pd->id = id;
- if (id == time_range_id)
+ if (id == time_range_id || id == 0)
pd->cur_tr = tr_pd;
list_add_tail(&tr_pd->entry, &pd->tr_list);