diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2019-02-04 01:22:03 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2019-04-27 19:33:45 +0200 |
| commit | 4bef0ec4fbe97c7865f1de676d22832344167bab (patch) | |
| tree | 5da74ec1de3744ebbcf6cae1a42d9371dfb1b83e /isisd/isis_circuit.c | |
| parent | 798ac49d06b6619adb4c5ac765b092397bc50a6c (diff) | |
isisd: replace dict_* with DECLARE_RBTREE
Historically, isisd has been carrying around its own red-black tree to
manage its LSP DB in. This replaces that with the newly-added
DECLARE_RBTREE_*. This allows completely removing the dict_* code.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'isisd/isis_circuit.c')
| -rw-r--r-- | isisd/isis_circuit.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index 8377638b92..f9a0285872 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -40,7 +40,6 @@ #include "qobj.h" #include "lib/northbound_cli.h" -#include "isisd/dict.h" #include "isisd/isis_constants.h" #include "isisd/isis_common.h" #include "isisd/isis_flags.h" @@ -540,7 +539,6 @@ static void isis_circuit_update_all_srmflags(struct isis_circuit *circuit, { struct isis_area *area; struct isis_lsp *lsp; - dnode_t *dnode; int level; assert(circuit); @@ -550,14 +548,10 @@ static void isis_circuit_update_all_srmflags(struct isis_circuit *circuit, if (!(level & circuit->is_type)) continue; - if (!area->lspdb[level - 1] - || !dict_count(area->lspdb[level - 1])) + if (!lspdb_count(&area->lspdb[level - 1])) continue; - for (dnode = dict_first(area->lspdb[level - 1]); - dnode != NULL; - dnode = dict_next(area->lspdb[level - 1], dnode)) { - lsp = dnode_get(dnode); + for_each (lspdb, &area->lspdb[level - 1], lsp) { if (is_set) { isis_tx_queue_add(circuit->tx_queue, lsp, TX_LSP_NORMAL); |
