]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
s_stats workaround
authorValery Yatsko <redacted>
Wed, 2 Apr 2008 10:35:57 +0000 (14:35 +0400)
committerValery Yatsko <redacted>
Wed, 2 Apr 2008 10:35:57 +0000 (14:35 +0400)
include/s_stats.h
src/ircd.c
src/s_stats.c

index 562e77c6ca87d0c672d3f6b9cb59409dbb1c924d..d65f1651d65d15aa98f81b3a216ebcd8c8a402d6 100644 (file)
@@ -74,7 +74,7 @@ struct ServerStatistics
        unsigned int is_tgch;   /* messages blocked due to target change */
 };
 
-extern struct ServerStatistics *ServerStats;
+extern struct ServerStatistics ServerStats;
 
 extern void init_stats(void);
 extern void tstats(struct Client *client);
index 935b342a2d348d89e3b53f61296792113ce0d73a..b369b7e37065b9a1e23d0e97dd47e84e1b04e96b 100644 (file)
@@ -81,6 +81,8 @@ extern char **myargv;
 int maxconnections; /* XXX */
 int ssl_ok = 0;
 
+struct ServerStatistics ServerStats;
+
 /*
  * print_startup - print startup information
  */
@@ -500,6 +502,7 @@ main(int argc, char *argv[])
        memset((void *) &Count, 0, sizeof(Count));
        memset((void *) &ServerInfo, 0, sizeof(ServerInfo));
        memset((void *) &AdminInfo, 0, sizeof(AdminInfo));
+       memset(&ServerStats, 0, sizeof(struct ServerStatistics));
 
        /* Initialise the channel capability usage counts... */
        init_chcap_usage_counts();
index c972293a3344cd948e6f0529db3ce17746fe0aaf..ac7c4934701ce15fec5f4ea281a787c724d636ae 100644 (file)
@@ -41,8 +41,7 @@
 /*
  * stats stuff
  */
-static struct ServerStatistics ircst;
-struct ServerStatistics *ServerStats = &ircst;
+struct ServerStatistics ServerStats;
 
 void
 init_stats()