diff options
| author | Anton <anton@picapica> | 2017-11-12 17:20:55 +0400 |
|---|---|---|
| committer | Anton <anton@picapica> | 2017-11-12 17:20:55 +0400 |
| commit | d9566575bf5b09bbb4b6efc7026d1ee7df0965a4 (patch) | |
| tree | 3dae58231fd47d3e05a14c23e2f527b8fdc2d8fd | |
| parent | fdb06bfda394614a18fa714f3209eba2b844925c (diff) | |
| download | pica-pica-d9566575bf5b09bbb4b6efc7026d1ee7df0965a4.tar.gz pica-pica-d9566575bf5b09bbb4b6efc7026d1ee7df0965a4.zip | |
bugfix, prevent removing entry from client_tree by duplicate connection
| -rw-r--r-- | PICA_node.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 |
