]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/restart.c
ok, trying to work on blockheap's stuff
[irc/rqf/shadowircd.git] / src / restart.c
index cc831e4bb3d1b60797605146904d4c6d35747822..2f7b4b9d101aa6297221e3dee688c2d05a451977 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: restart.c 3249 2007-03-05 18:51:17Z nenolod $
+ *  $Id: restart.c 3354 2007-04-03 09:21:31Z nenolod $
  */
 
 #include "stdinc.h"
-#include "tools.h"
 #include "restart.h"
 #include "common.h"
 #include "ircd.h"
 #include "send.h"
 #include "s_log.h"
 #include "client.h"            /* for FLAGS_ALL */
-#include "memory.h"
 
 /* external var */
 extern char **myargv;
@@ -55,6 +53,7 @@ void
 server_reboot(void)
 {
        int i;
+       int maxconn = rb_get_maxconnections();
 
        sendto_realops_snomask(SNO_GENERAL, L_ALL, "Restarting server...");
 
@@ -62,14 +61,14 @@ server_reboot(void)
        /*
         * XXX we used to call flush_connections() here. But since this routine
         * doesn't exist anymore, we won't be flushing. This is ok, since 
-        * when close handlers come into existance, comm_close() will be called
+        * when close handlers come into existance, rb_close() will be called
         * below, and the data flushing will be implicit.
         *    -- adrian
         *
         * bah, for now, the program ain't coming back to here, so forcibly
         * close everything the "wrong" way for now, and just LEAVE...
         */
-       for (i = 0; i < MAXCONNECTIONS; ++i)
+       for (i = 0; i < maxconn; ++i)
                close(i);
 
        unlink(pidFileName);