summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/routing.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-03-28 08:38:05 +0000
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-28 08:38:05 +0000
commitba13c05b8b61365ff9e969c15affd2e1d52b76ed (patch)
treebaa5d6178914dd12106845ca81c81b63e4249c6f /src/ipcpd/normal/routing.c
parent7ee6dadd39f3d4b5874d23bfcdcdd66eb195124e (diff)
parent6d080d9b9ee2e480717935e4ce94870fc87ea5f7 (diff)
downloadouroboros-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.c15
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;