From c39c47d82c8ed6f959d9f01b9fd77bf62e5f36c4 Mon Sep 17 00:00:00 2001 From: Katerina Kubecova Date: Wed, 4 Sep 2024 14:42:00 +0200 Subject: [PATCH] looks like i understood it wrong... So lets save old and change it.now, the hooks do not work, request is at wrong place and there is chaos between import and main table --- proto/bmp/bmp.c | 4 ++-- proto/bmp/bmp.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/proto/bmp/bmp.c b/proto/bmp/bmp.c index 39e95c10..ddeccf18 100644 --- a/proto/bmp/bmp.c +++ b/proto/bmp/bmp.c @@ -542,7 +542,7 @@ bmp_add_table_exp_req(struct bmp_proto *p, rtable *tab) e->hook = bmp_rt_notify_exp_req; e->data = p; - p->out_req = (struct rt_export_request) { + bt->out_req = (struct rt_export_request) { .name = mb_sprintf(p->p.pool, "%s.exp_request", p->p.name), .r = (struct lfjour_recipient) { .target = &p->p.loop->event_list, @@ -557,7 +557,7 @@ bmp_add_table_exp_req(struct bmp_proto *p, rtable *tab) //.dump = channel_dump_export_req, //.fed = channel_export_fed, }; - rt_export_subscribe(tab, all, &p->out_req); + rt_export_subscribe(tab, all, &bt->out_req); return bt; } diff --git a/proto/bmp/bmp.h b/proto/bmp/bmp.h index e9a7c22f..c2d036eb 100644 --- a/proto/bmp/bmp.h +++ b/proto/bmp/bmp.h @@ -76,8 +76,6 @@ struct bmp_proto { struct lfjour_recipient proto_state_reader; // Reader of protocol states event proto_state_changed; int lf_jour_inited; - - struct rt_export_request out_req; }; struct bmp_peer { @@ -101,6 +99,7 @@ struct bmp_table { rtable *table; struct bmp_table *next; struct channel *channel; + struct rt_export_request out_req; u32 uc; };