* External stuff
*--------------------------------------------------------------------------*/
extern void init_counters(void);
+extern void mem_dbg_initialise(void);
/*----------------------------------------------------------------------------
* Constants / Enums
struct ConnectionClass* cltmp;
struct ConfItem* con_conf = 0;
struct Jupe* ajupe;
- unsigned int con_class = 0;
+ const char* con_class = NULL;
assert(ET_EXPIRE == ev_type(ev));
assert(0 != ev_timer(ev));
Debug((DEBUG_NOTICE, "Connection check at : %s", myctime(CurrentTime)));
for (aconf = GlobalConfList; aconf; aconf = aconf->next) {
/* Also when already connecting! (update holdtimes) --SRB */
- if (!(aconf->status & CONF_SERVER) || aconf->port == 0)
+ if (!(aconf->status & CONF_SERVER) || aconf->port == 0 || aconf->hold == 0)
continue;
/* Also skip juped servers */
cltmp = aconf->conn_class;
confrq = get_con_freq(cltmp);
- aconf->hold = CurrentTime + confrq;
+ if(confrq == 0)
+ aconf->hold = next = 0;
+ else
+ aconf->hold = CurrentTime + confrq;
/* Found a CONNECT config with port specified, scan clients and see if
* this server is already connected?
cptr = FindServer(aconf->name);
if (!cptr && (Links(cltmp) < MaxLinks(cltmp)) &&
- (!connecting || (ConClass(cltmp) > con_class))) {
+ (!connecting /*|| (ConClass(cltmp) > con_class)*/)) {
/*
* Check connect rules to see if we're allowed to try
*/
case 'd': dpath = optarg; break;
case 'f': configfile = optarg; break;
case 'h': ircd_strncpy(cli_name(&me), optarg, HOSTLEN); break;
- case 'v': printf("ircd %s\n", version); exit(0);
+ case 'v':
+ printf("ircd %s\n", version);
+ printf("Event engines: ");
+#ifdef USE_KQUEUE
+ printf("kqueue() ");
+#endif
+#ifdef USE_DEVPOLL
+ printf("/dev/poll ");
+#endif
+#ifdef USE_POLL
+ printf("poll()");
+#else
+ printf("select()");
+#endif
+ printf("\nCompiled for a maximum of %d connections.\n", MAXCONNECTIONS);
+
+
+ exit(0);
+ break;
case 'x':
debuglevel = atoi(optarg);
thisServer.uid = getuid();
thisServer.euid = geteuid();
+#ifdef MDEBUG
+ mem_dbg_initialise();
+#endif
+
#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_CORE)
set_core_limit();
#endif