
Hello, I noticed a tiny bug in the LUSERS response using the latest bahamut 1.8(06). Specifically I was getting some weired "unknown connection(s)" negative values like: -2 unknown connection(s) thus I added some debug code for every counter increase/decrease statement to figure out what is going wrong. Here are my findings: The counter *only* increases within the function: add_connection() in s_bsd.c. 3 functions decrease the counter: do_server_estab() in m_server.c (When a connection with a remote server is established) register_user() in s_user.c (When a client is registered via NICK/USER) exit_client() in s_misc.c (When the client quits and is marked as unknown) so here are some scenarios that can occur: Suppose, test1.example.net is our local server (unlinked) test2.example.net is a remote server (unlinked) test3.example.net is another remote server (unlinked) client1 is.. a client - Count.unknown = 0; in main() - Client connects to the server and the counter is increased via add_connection(), Count.unknown == 1. The client either registers or quits so the counter gets decreased back to zero via register_user() or exit_client() respectively. Count.unknown == 0. - test2.example.net initiates a connection to "us" (test1.example.net) so the add_connection() is called and the counter is increased to 1. The connection with the remote server is established so do_server_estab() decreases the counter back to 0. Count.unknown == 0. Everything ok so far.. - We initialize a connection to test3.example.net (via CONNECT). The counter is *not* increased since add_connection is never called. The negotiation with the remote server is established and do_server_estab() is called decreasing the counter to -1. Oups!! Count.unknown == -1 I guess a solution could be to increase the counter in connect_server() too but then the counter should be also decreased when the connection to the remote server fails and do_server_estab() is never called. Any ideas/solutions for this? Thanks, Charalampos Pournaris __________ Information from ESET NOD32 Antivirus, version of virus signature database 4523 (20091019) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com