From d9566575bf5b09bbb4b6efc7026d1ee7df0965a4 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 12 Nov 2017 17:20:55 +0400 Subject: bugfix, prevent removing entry from client_tree by duplicate connection --- PICA_node.c | 1 + 1 file changed, 1 insertion(+) (limited to 'PICA_node.c') diff --git a/PICA_node.c b/PICA_node.c index 1d04f4c..a6c5878 100644 --- a/PICA_node.c +++ b/PICA_node.c @@ -2479,6 +2479,7 @@ void process_c2n_write() if (client_tree_search(i_ptr->id)) { PICA_info("Disconnecting client %p because other user with same ID = %u is already connected", i_ptr, i_ptr->id); + memset(i_ptr->id, 0, PICA_ID_SIZE);//reset id to all zeros to prevent removing existing ID from previous connection from client_tree ret = 0;//id already exists in tree } else -- cgit v1.2.1