Browse Source

fix: self node online=0 after chat_core_init refactor — add topo_node_sqlite_node_set_online(self, 1)

topo_upd
Evgeny 2 months ago
parent
commit
5265783164
  1. 1
      tools/chatgui/transport/chat_core.c

1
tools/chatgui/transport/chat_core.c

@ -120,6 +120,7 @@ int chat_core_init(struct UTUN_INSTANCE* inst, const char* db_path) {
topo_node_sqlite_node_update_verified(g_cc.db, g_cc.my_node_id, topo_node_sqlite_node_update_verified(g_cc.db, g_cc.my_node_id,
my_name, inst->my_keys.public_key, inst->my_ed25519_pubkey, my_name, inst->my_keys.public_key, inst->my_ed25519_pubkey,
(uint64_t)now_sec, (time_t)now_sec); (uint64_t)now_sec, (time_t)now_sec);
topo_node_sqlite_node_set_online(g_cc.db, g_cc.my_node_id, 1);
sqlite3_stmt* st = NULL; sqlite3_stmt* st = NULL;
sqlite3_prepare_v2(g_cc.db, sqlite3_prepare_v2(g_cc.db,
"INSERT OR REPLACE INTO local_identity(id,node_id,name,x25519_pubkey,ed25519_pubkey,created_at,updated_at)" "INSERT OR REPLACE INTO local_identity(id,node_id,name,x25519_pubkey,ed25519_pubkey,created_at,updated_at)"

Loading…
Cancel
Save