ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/restart.c
(Generate patch)

Comparing:
ircd-hybrid/src/restart.c (file contents), Revision 33 by knight, Sun Oct 2 20:50:00 2005 UTC vs.
ircd-hybrid/trunk/src/restart.c (file contents), Revision 1631 by michael, Thu Nov 1 22:04:01 2012 UTC

# Line 23 | Line 23
23   */
24  
25   #include "stdinc.h"
26 < #include "tools.h"
26 > #include "list.h"
27   #include "restart.h"
28 – #include "common.h"
28   #include "fdlist.h"
29   #include "ircd.h"
30   #include "irc_string.h"
31   #include "send.h"
32 < #include "s_log.h"
32 > #include "log.h"
33   #include "client.h" /* for UMODE_ALL */
34   #include "memory.h"
35 + #include "conf_db.h"
36  
37   void
38   restart(const char *mesg)
39   {
40    static int was_here = 0; /* redundant due to restarting flag below */
41  
42 <  if (was_here)
42 >  if (was_here++)
43      abort();
44 –  was_here = 1;
44  
45 <  server_die(mesg, YES);
45 >  server_die(mesg, 1);
46   }
47  
48   void
# Line 52 | Line 51 | server_die(const char *mesg, int rboot)
51    char buffer[IRCD_BUFSIZE];
52    dlink_node *ptr = NULL;
53    struct Client *target_p = NULL;
54 +  static int was_here = 0;
55 +
56 +  if (rboot && was_here++)
57 +    abort();
58  
59    if (EmptyString(mesg))
60      snprintf(buffer, sizeof(buffer), "Server %s",
# Line 75 | Line 78 | server_die(const char *mesg, int rboot)
78      sendto_one(target_p, ":%s ERROR :%s", me.name, buffer);
79    }
80  
81 <  ilog(L_NOTICE, buffer);
81 >  ilog(LOG_TYPE_IRCD, "%s", buffer);
82 >
83 >  save_all_databases(NULL);
84  
85    send_queued_all();
86    close_fds(NULL);

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)