diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-03-28 08:38:05 +0000 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-03-28 08:38:05 +0000 |
commit | ba13c05b8b61365ff9e969c15affd2e1d52b76ed (patch) | |
tree | baa5d6178914dd12106845ca81c81b63e4249c6f /src/ipcpd/normal/routing.c | |
parent | 7ee6dadd39f3d4b5874d23bfcdcdd66eb195124e (diff) | |
parent | 6d080d9b9ee2e480717935e4ce94870fc87ea5f7 (diff) | |
download | ouroboros-ba13c05b8b61365ff9e969c15affd2e1d52b76ed.tar.gz ouroboros-ba13c05b8b61365ff9e969c15affd2e1d52b76ed.zip |
Merged in sandervrijders/ouroboros/be-upd-graph (pull request #426)
Be upd graph
Diffstat (limited to 'src/ipcpd/normal/routing.c')
-rw-r--r-- | src/ipcpd/normal/routing.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/ipcpd/normal/routing.c b/src/ipcpd/normal/routing.c index 998b294a..bf736311 100644 --- a/src/ipcpd/normal/routing.c +++ b/src/ipcpd/normal/routing.c @@ -235,23 +235,14 @@ static int read_fso(char * path, return -1; } - if (flag & RO_CREATE) { - if (graph_add_edge(routing.graph, - fso->s_addr, fso->d_addr, qs)) { - log_err("Failed to add edge to graph."); - fso__free_unpacked(fso, NULL); - return -1; - } - } else if (flag & RO_MODIFY) { + if (flag & RO_MODIFY) { if (graph_update_edge(routing.graph, fso->s_addr, fso->d_addr, qs)) { - log_err("Failed to update edge of graph."); fso__free_unpacked(fso, NULL); return -1; } } else if (flag & RO_DELETE) { if (graph_del_edge(routing.graph, fso->s_addr, fso->d_addr)) { - log_err("Failed to del edge of graph."); fso__free_unpacked(fso, NULL); return -1; } @@ -272,8 +263,7 @@ static void * rib_listener(void * o) (void) o; - if (ro_set_add(routing.set, ROUTING_PATH, - RO_MODIFY | RO_CREATE | RO_DELETE)) { + if (ro_set_add(routing.set, ROUTING_PATH, RO_MODIFY | RO_DELETE)) { log_err("Failed to add to RO set"); return (void * ) -1; } @@ -292,6 +282,7 @@ static void * rib_listener(void * o) } while (rib_event_wait(routing.set, routing.queue, NULL) == 0) { + path[0] = '\0'; flag = rqueue_next(routing.queue, path); if (flag < 0) continue; |