summaryrefslogtreecommitdiff
path: root/src/routing.c
diff options
context:
space:
mode:
authorJesper Jensen <jesper@jnsn.dev>2025-05-07 23:01:47 +0200
committerJesper Jensen <jesper@jnsn.dev>2025-05-07 23:01:47 +0200
commitd230c01c0609529332eb72ae1b65f0ddddd515a0 (patch)
tree446a0f79335da46150f1e82ab3080bf5e8ed94fc /src/routing.c
parentddc816a34861a0e090ea84fc945842593c34f45a (diff)
Transfer the id after loading it
Diffstat (limited to 'src/routing.c')
-rw-r--r--src/routing.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/routing.c b/src/routing.c
index a3e0b26..02b2f03 100644
--- a/src/routing.c
+++ b/src/routing.c
@@ -58,6 +58,11 @@ void routing_init(struct nodeid* myid) {
routing_flush();
}
+void routing_setid(struct nodeid *id) {
+ pTable->myID = *id;
+ myID = pTable->myID;
+}
+
void routing_update_metrics() {
char buf[4]; // Largest value is 157 + \0