chat: убрать PEER_REMOVE (conn_down ≠ удаление мембера), удалить мёртвый member_sync_del
This commit is contained in:
1 parent
f550c80592
commit
b69dcb4eab
4 files changed
+23
-92
No files matched your search
@@ -702,14 +702,6 @@ int member_sync_put(struct UTUN_INSTANCE* inst, const char* ch_id,
|
||||
return member_sync_apply_record(inst, ch_id, inst->node_id, &m);
|
||||
}
|
||||
|
||||
int member_sync_del(struct UTUN_INSTANCE* inst, const char* ch_id, uint64_t member_id) {
|
||||
if (!inst || !ch_id) { DEBUG_ERROR(DEBUG_CATEGORY_MEMBER_SYNC, "%s: del — inst=%p ch_id=%s", MS_ID, (void*)inst, ch_id ? ch_id : "(null)"); return -1; }
|
||||
DEBUG_TRACE(DEBUG_CATEGORY_MEMBER_SYNC, "%s: del ch=%s nid=%016llx", MS_ID, ch_id, (unsigned long long)member_id);
|
||||
sqlite3* db = _db(inst); if (!db) { DEBUG_ERROR(DEBUG_CATEGORY_MEMBER_SYNC, "%s: del — db is NULL ch=%s", MS_ID, ch_id); return -1; }
|
||||
topo_node_sqlite_member_del(db, ch_id, member_id);
|
||||
return merkle_sync_recompute_path(inst, ch_id, member_id);
|
||||
}
|
||||
|
||||
int member_sync_count(struct UTUN_INSTANCE* inst, const char* ch_id) {
|
||||
sqlite3* db = _db(inst);
|
||||
if (!db || !ch_id) return 0;
|
||||
|
||||
Reference in new issue
Block a user