summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2011-01-08 14:44:36 +0300
committerDmitry Kozlov <xeb@mail.ru>2011-01-08 14:44:36 +0300
commit8e3c4febda2ea707f164fe229b8182a232620909 (patch)
tree4c43cf2298c54f734cd6d60486c312d5f212eeb5
parentb98f515daa345fb83002a149c1f1f33a7b4644e7 (diff)
downloadaccel-ppp-8e3c4febda2ea707f164fe229b8182a232620909.tar.gz
accel-ppp-8e3c4febda2ea707f164fe229b8182a232620909.zip
shaper_tbf: fix undefined symbol: clear_tr_pd when build without radius
-rw-r--r--accel-pppd/extra/shaper_tbf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/accel-pppd/extra/shaper_tbf.c b/accel-pppd/extra/shaper_tbf.c
index d7e4f0bd..43f502c1 100644
--- a/accel-pppd/extra/shaper_tbf.c
+++ b/accel-pppd/extra/shaper_tbf.c
@@ -606,15 +606,6 @@ static void parse_string(const char *str, int dir, int *speed, int *burst, int *
}
}
-#ifdef RADIUS
-static void parse_attr(struct rad_attr_t *attr, int dir, int *speed, int *burst, int *tr_id)
-{
- if (attr->attr->type == ATTR_TYPE_STRING)
- parse_string(attr->val.string, dir, speed, burst, tr_id);
- else if (attr->attr->type == ATTR_TYPE_INTEGER)
- *speed = attr->val.integer;
-}
-
static struct time_range_pd_t *get_tr_pd(struct shaper_pd_t *pd, int id)
{
struct time_range_pd_t *tr_pd;
@@ -647,6 +638,15 @@ static void clear_tr_pd(struct shaper_pd_t *pd)
}
}
+#ifdef RADIUS
+static void parse_attr(struct rad_attr_t *attr, int dir, int *speed, int *burst, int *tr_id)
+{
+ if (attr->attr->type == ATTR_TYPE_STRING)
+ parse_string(attr->val.string, dir, speed, burst, tr_id);
+ else if (attr->attr->type == ATTR_TYPE_INTEGER)
+ *speed = attr->val.integer;
+}
+
static void check_radius_attrs(struct shaper_pd_t *pd, struct rad_packet_t *pack)
{
struct rad_attr_t *attr;
@@ -1102,7 +1102,7 @@ static void load_time_ranges(void)
if (r) {
list_add_tail(&r->entry, &time_range_list);
if (r->begin.expire_tv.tv_sec > r->end.expire_tv.tv_sec) {
- if (ts >= r->begin.expire_tv.tv_sec - 24*60*60 && ts <= r->end.expire_tv.tv_sec)
+ if (ts >= r->begin.expire_tv.tv_sec && ts <= r->end.expire_tv.tv_sec + 24*60*60)
time_range_begin_timer(&r->begin);
} else {
if (ts >= r->begin.expire_tv.tv_sec && ts <= r->end.expire_tv.tv_sec)