summaryrefslogtreecommitdiff
path: root/proto/pipe/pipe.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-04-21 21:05:36 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2012-04-21 21:05:36 +0200
commit7d0a31deed92971e274aa0314e12619f93c850c9 (patch)
treedbd019cd9ffb61c38c3d6e254bc77dae9f58db29 /proto/pipe/pipe.c
parent334a0ed24d015e106558cc9eeef301c6f0d21aec (diff)
Fixes in generalized import limits.
Diffstat (limited to 'proto/pipe/pipe.c')
-rw-r--r--proto/pipe/pipe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c
index a5fcc6f6..41bac474 100644
--- a/proto/pipe/pipe.c
+++ b/proto/pipe/pipe.c
@@ -127,10 +127,8 @@ pipe_reload_routes(struct proto *P)
*/
proto_request_feeding(P);
- if (P->main_ahook->in_limit)
- P->main_ahook->in_limit->active = 0;
- if (p->peer_ahook->in_limit)
- p->peer_ahook->in_limit->active = 0;
+ proto_reset_limit(P->main_ahook->in_limit);
+ proto_reset_limit(p->peer_ahook->in_limit);
return 1;
}
@@ -168,10 +166,12 @@ pipe_start(struct proto *P)
P->main_ahook = proto_add_announce_hook(P, P->table, &P->stats);
P->main_ahook->out_filter = cf->c.out_filter;
P->main_ahook->in_limit = cf->c.in_limit;
+ proto_reset_limit(P->main_ahook->in_limit);
p->peer_ahook = proto_add_announce_hook(P, p->peer_table, &p->peer_stats);
p->peer_ahook->out_filter = cf->c.in_filter;
p->peer_ahook->in_limit = cf->out_limit;
+ proto_reset_limit(p->peer_ahook->in_limit);
return PS_UP;
}