From 2dbb0397c7371ad55f6c90fe0fbe305058a39a09 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Mon, 25 Apr 2011 17:59:46 +0400 Subject: shaper_tbf: fixed bug of incorrect operation when time ranges are spicified and connection whithout time range identifier is arrived --- accel-pppd/extra/shaper_tbf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'accel-pppd/extra') diff --git a/accel-pppd/extra/shaper_tbf.c b/accel-pppd/extra/shaper_tbf.c index 7ea48d0d..c276869f 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); -- cgit v1.2.3