summaryrefslogtreecommitdiff
path: root/src/routing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/routing.c')
-rw-r--r--src/routing.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/routing.c b/src/routing.c
index dc8c2bf..eca84f9 100644
--- a/src/routing.c
+++ b/src/routing.c
@@ -42,9 +42,17 @@ struct table {
struct table* pTable;
+struct nodeid myID;
+struct entry *table;
+int table_size = RT_SIZE;
+
void routing_init(struct nodeid* myid) {
pTable = malloc(sizeof(struct table));
- pTable->myID = *myid;
+ if(myid != NULL) pTable->myID = *myid;
+
+ table = pTable->table;
+ myID = pTable->myID;
+
routing_flush();
}