summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/routing.c
diff options
context:
space:
mode:
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;