summaryrefslogtreecommitdiff
path: root/net/bird3/files/patch-01-Table-not-feeding-twice
blob: 4fb40a644fb2ef73c861957ec7a9c956b644fdd2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 0a2f92ad205d96d0be0945ecf2bb740b68d5a3c1 Mon Sep 17 00:00:00 2001
From: Maria Matejka <mq@ucw.cz>
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 7368447de..7d51e54cf 100644
--- nest/rt-export.c
+++ 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)
-- 
GitLab