mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Removed unnecessary recursion from rt_export_get()
This commit is contained in:
parent
76a1998ff5
commit
0e42398304
@ -49,13 +49,14 @@ rt_export_get(struct rt_export_request *r)
|
||||
.feed = feed, \
|
||||
}; \
|
||||
return (r->cur = reu); \
|
||||
} while (0) \
|
||||
} while (0)
|
||||
|
||||
#define NOT_THIS_UPDATE do { \
|
||||
#define NOT_THIS_UPDATE \
|
||||
lfjour_release(&r->r); \
|
||||
return rt_export_get(r); \
|
||||
} while (0) \
|
||||
continue;
|
||||
|
||||
while (1)
|
||||
{
|
||||
enum rt_export_state es = rt_export_get_state(r);
|
||||
switch (es)
|
||||
{
|
||||
@ -92,6 +93,7 @@ rt_export_get(struct rt_export_request *r)
|
||||
|
||||
/* No update, try feed */
|
||||
if (!update)
|
||||
{
|
||||
if (es == TES_READY)
|
||||
{
|
||||
/* Fed up of feeding */
|
||||
@ -120,6 +122,7 @@ rt_export_get(struct rt_export_request *r)
|
||||
CALL(r->fed, r);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* There actually is an update */
|
||||
if (bmap_test(&r->seq_map, update->seq))
|
||||
@ -165,6 +168,7 @@ rt_export_get(struct rt_export_request *r)
|
||||
rtex_trace(r, D_ROUTES, "Updating %N, seq %lu", n, update->seq);
|
||||
|
||||
EXPORT_FOUND(RT_EXPORT_UPDATE);
|
||||
}
|
||||
|
||||
#undef NOT_THIS_UPDATE
|
||||
#undef EXPORT_FOUND
|
||||
|
Loading…
Reference in New Issue
Block a user