diff options
author | Maria Matejka <mq@ucw.cz> | 2022-08-02 22:08:59 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-08-02 22:08:59 +0200 |
commit | 71b434a987067475b517792360f58dbe03bfee9e (patch) | |
tree | a6bad599a80fd6dd16b0117f16e95a5c213cfe8d /nest/proto.c | |
parent | 0072d11f3431165240656edf6ade473554b8747e (diff) | |
parent | f0507f05ce57398e135651896dace4cb68eeed54 (diff) |
Merge commit 'f0507f05ce57398e135651896dace4cb68eeed54' into thread-next
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nest/proto.c b/nest/proto.c index 1d480ba2..e64cef28 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -1963,10 +1963,17 @@ channel_reset_limit(struct channel *c, struct limit *l, int dir) c->limit_active &= ~(1 << dir); } +static struct rte_owner_class default_rte_owner_class; + static inline void proto_do_start(struct proto *p) { p->active = 1; + + rt_init_sources(&p->sources, p->name, proto_event_list(p)); + if (!p->sources.class) + p->sources.class = &default_rte_owner_class; + if (!p->cf->late_if_feed) if_feed_baby(p); } @@ -1975,10 +1982,8 @@ static void proto_do_up(struct proto *p) { if (!p->main_source) - { p->main_source = rt_get_source(p, 0); - rt_lock_source(p->main_source); - } + // Locked automaticaly proto_start_channels(p); @@ -2005,6 +2010,7 @@ proto_do_stop(struct proto *p) } proto_stop_channels(p); + rt_destroy_sources(&p->sources, p->event); p->do_stop = 1; proto_send_event(p); |