From 0a2f92ad205d96d0be0945ecf2bb740b68d5a3c1 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 19 Dec 2024 11:54:05 +0100 Subject: [PATCH] Table: not feeding twice, once is enough If there is no feed pending, the requested one should be activated immediately, otherwise it is activated only after the full run, effectively running first a full feed and then the requested one. --- nest/rt-export.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nest/rt-export.c b/nest/rt-export.c index 7368447d..7d51e54c 100644 --- a/nest/rt-export.c +++ b/nest/rt-export.c @@ -357,8 +357,16 @@ rt_export_refeed_feeder(struct rt_export_feeder *f, struct rt_feeding_request *r if (!rfr) return; - rfr->next = f->feed_pending; - f->feed_pending = rfr; + if (f->feeding) + { + rfr->next = f->feed_pending; + f->feed_pending = rfr; + } + else + { + rfr->next = NULL; + f->feeding = rfr; + } } void rt_export_refeed_request(struct rt_export_request *rer, struct rt_feeding_request *rfr)