]> jfr.im git - irc/blitzed-org/bopm.git/commitdiff
scan.c, config.c, extern.h, bopm.conf.sample: Added CONF_TIMEOUT and TIMEOUT REL-2-2
authorstrtok <redacted>
Sat, 4 May 2002 18:48:13 +0000 (18:48 +0000)
committerstrtok <redacted>
Sat, 4 May 2002 18:48:13 +0000 (18:48 +0000)
          directive to allow for configurable scan timeouts (suggested by lilo).

bopm.conf.sample
config.c
extern.h
scan.c

index 4bcaa4469ec5ee0533d4e5d10c569baf88192454..f31fc241bdfe2008884c6137962fb6fa46816775 100644 (file)
@@ -143,6 +143,19 @@ SCANIP 127.0.0.1
 SCANPORT 6667
 
 
+
+
+# TIMEOUT <seconds> : Number of seconds before a particular scan on a client
+#                     will timeout. The higher this is set, the more chance of
+#                     slower proxies being caught. However a higher value also means
+#                     more demand for file descriptors at any one time. 
+#                     A default value of 30 is recommended.                  
+
+TIMEOUT 30
+
+
+
+
 # TARGET_STRING <string> : Target string we test for in the data read by the scanner,
 #                          this should be a string within the data that your ircd usually
 #                          sends on connect. The default should work on most bahamut 
index 1e52bdc7a2728ceb80dcd899c5124d865e220087..a7bc6ea8f7a26364f4e7d260adfcbc006b0772bd 100644 (file)
--- a/config.c
+++ b/config.c
@@ -71,6 +71,7 @@ string_list *CONF_EXCLUDE  = 0;
 unsigned int  CONF_SCANPORT         = 0;
 unsigned int  CONF_PORT             = 0;
 unsigned int  CONF_FDLIMIT          = 0;
+unsigned int  CONF_TIMEOUT          = 0;
 
 /* Configuration Hash , Hashes Config Params to their Function Handlers*/
 /*      NAME                  , TYPE   , REQ, REQMET, PTR TO VAR        */
@@ -101,6 +102,7 @@ config_hash hash[] = {
        {"AWAY",                TYPE_STRING, 1,0,    &CONF_AWAY               },
        {"TARGET_STRING",       TYPE_STRING, 1,0,    &CONF_TARGET_STRING      },
        {"EXCLUDE",             TYPE_LIST,   0,0,    &CONF_EXCLUDE            },
+       {"TIMEOUT",             TYPE_INT,    1,0,    &CONF_TIMEOUT            },
        {0,                     0,           0,0,    0                        },
 };
 
index fe3237e6c03f63ef16d8e8184d51b5f9c037bd45..8aea0f382bc838bd5cee15cba7ed65be2d923a5c 100644 (file)
--- a/extern.h
+++ b/extern.h
@@ -31,6 +31,7 @@ extern string_list *CONF_EXCLUDE;
 extern unsigned int CONF_PORT;
 extern unsigned int CONF_SCANPORT;
 extern unsigned int CONF_FDLIMIT;
+extern unsigned int CONF_TIMEOUT;
 
 extern unsigned int OPT_DEBUG;
  
diff --git a/scan.c b/scan.c
index 08ea9ef55d8c35f0305e6c1df81f25b5f4239110..99278a1b7ffda71c94b5e8de5d41c0058da8843d 100644 (file)
--- a/scan.c
+++ b/scan.c
@@ -651,7 +651,7 @@ void scan_timer()
                        }
                }
 
-               if (((present - ss->create_time) >= 30) ||
+               if (((present - ss->create_time) >= CONF_TIMEOUT) ||
                    (ss->state == STATE_CLOSED)) {
                        /* State closed or timed out, remove */ 
                        if (ss->verbose && (ss->state != STATE_CLOSED)) {