From b5cf99a8c35b3679838691f64a7d57e4693d637a Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Wed, 2 Apr 2008 14:35:57 +0400 Subject: [PATCH] s_stats workaround --- include/s_stats.h | 2 +- src/ircd.c | 3 +++ src/s_stats.c | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/s_stats.h b/include/s_stats.h index 562e77c6..d65f1651 100644 --- a/include/s_stats.h +++ b/include/s_stats.h @@ -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); diff --git a/src/ircd.c b/src/ircd.c index 935b342a..b369b7e3 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -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(); diff --git a/src/s_stats.c b/src/s_stats.c index c972293a..ac7c4934 100644 --- a/src/s_stats.c +++ b/src/s_stats.c @@ -41,8 +41,7 @@ /* * stats stuff */ -static struct ServerStatistics ircst; -struct ServerStatistics *ServerStats = &ircst; +struct ServerStatistics ServerStats; void init_stats()