diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-09-25 17:36:18 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-09-26 15:27:19 +0200 |
commit | 5d01c511fc1c31fdeee6bb515be0ca300854ba21 (patch) | |
tree | e2962df2d53d0a31bf935eec5088654bbfe204d0 /src/ipcpd/normal/pol/link_state.c | |
parent | 0847da715c82d49b01758d88ecca496eba2c8d34 (diff) | |
download | ouroboros-5d01c511fc1c31fdeee6bb515be0ca300854ba21.tar.gz ouroboros-5d01c511fc1c31fdeee6bb515be0ca300854ba21.zip |
ipcpd: normal: Add refcount to graph edges
This adds a refcount to the graph edges so that it is only included in
the calculation if both sides announced it.
Diffstat (limited to 'src/ipcpd/normal/pol/link_state.c')
-rw-r--r-- | src/ipcpd/normal/pol/link_state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipcpd/normal/pol/link_state.c b/src/ipcpd/normal/pol/link_state.c index d45dae15..51d317bc 100644 --- a/src/ipcpd/normal/pol/link_state.c +++ b/src/ipcpd/normal/pol/link_state.c @@ -379,12 +379,11 @@ static int nbr_to_fd(uint64_t addr) static void * calculate_pff(void * o) { struct routing_i * instance; - int i = 0; int fd; struct list_head table; struct list_head * p; struct list_head * q; - int fds[1024]; + int fds[AP_MAX_FLOWS]; instance = (struct routing_i *) o; @@ -399,6 +398,7 @@ static void * calculate_pff(void * o) pff_flush(instance->pff); list_for_each(p, &table) { + int i = 0; struct routing_table * t = list_entry(p, struct routing_table, next); @@ -475,7 +475,7 @@ static void * lsupdate(void * o) adj->src, adj->dst); if (graph_del_edge(ls.graph, adj->src, adj->dst)) - log_dbg("Failed to delete edge."); + log_err("Failed to del edge."); free(adj); continue; } |