diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ipcpd/normal/graph.c | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/src/ipcpd/normal/graph.c b/src/ipcpd/normal/graph.c index ecaff14c..b3e105e3 100644 --- a/src/ipcpd/normal/graph.c +++ b/src/ipcpd/normal/graph.c @@ -235,6 +235,8 @@ int graph_add_edge(struct graph * graph,          pthread_mutex_unlock(&graph->lock); +        log_dbg("Added an edge to the graph."); +          return 0;  } @@ -268,6 +270,8 @@ int graph_update_edge(struct graph * graph,          pthread_mutex_unlock(&graph->lock); +        log_dbg("Updated an edge of the graph."); +          return 0;  } @@ -315,6 +319,8 @@ int graph_del_edge(struct graph * graph,          pthread_mutex_unlock(&graph->lock); +        log_dbg("Removed an edge of the graph."); +          return 0;  } @@ -453,6 +459,11 @@ ssize_t graph_routing_table(struct graph *           graph,          pthread_mutex_lock(&graph->lock); +        if (graph->nr_vertices == 0) { +                pthread_mutex_unlock(&graph->lock); +                return 0; +        } +          prevs = dijkstra(graph, s_addr);          if (prevs == NULL) {                  pthread_mutex_unlock(&graph->lock); | 
