summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@jmq.cz>2021-11-23 11:12:32 +0000
committerMaria Matejka <mq@jmq.cz>2021-11-23 11:12:32 +0000
commit4ba991f19c2f8aa893a723f29775c50e1370ed07 (patch)
treea9b650d4da1f5a2cd1f887dc71da160c693a006d /nest/proto.c
parent44dbedbe3fa77a16ea7d5736f07e65d9e2c0b165 (diff)
Fixed channel export map confusion
Diffstat (limited to 'nest/proto.c')
-rw-r--r--nest/proto.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 978582ca..7a09ed64 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -596,6 +596,9 @@ channel_export_stopped(struct rt_export_request *req)
mb_free(c->out_req.name);
c->out_req.name = NULL;
+ bmap_free(&c->export_map);
+ bmap_free(&c->export_reject_map);
+
if (c->restart_export)
{
c->restart_export = 0;
@@ -993,9 +996,6 @@ channel_do_pause(struct channel *c)
}
channel_roa_unsubscribe_all(c);
-
- bmap_free(&c->export_map);
- bmap_free(&c->export_reject_map);
}
static void
@@ -1035,16 +1035,11 @@ channel_do_down(struct channel *c)
c->proto->active_channels--;
- // bmap_free(&c->export_map);
memset(&c->import_stats, 0, sizeof(struct channel_import_stats));
memset(&c->export_stats, 0, sizeof(struct channel_export_stats));
CALL(c->channel->cleanup, c);
- /* This have to be done in here, as channel pool is freed before channel_do_down() */
- bmap_free(&c->export_map);
- bmap_free(&c->export_reject_map);
-
/* Schedule protocol shutddown */
if (proto_is_done(c->proto))
proto_send_event(c->proto);