Make os_get_rusage() conditional on DEBUGMODE.
authorMichael Poole <mdpoole@troilus.org>
Wed, 12 Oct 2005 01:48:33 +0000 (01:48 +0000)
committerMichael Poole <mdpoole@troilus.org>
Wed, 12 Oct 2005 01:48:33 +0000 (01:48 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1522 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/os_generic.c

index 4aa2e867f6cbe60da493db669e7d38491e9b902f..07e9a9b69e7d4084698a76eb4338b81e6a33d4a7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-11  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/os_generic.c (os_get_rusage): Make conditional on DEBUGMODE
+       to mitigate bug #1313429.
+
 2005-10-12  Perry Lorier <isomer@undernet.org>
 
        * include/s_stats.h: Add new "Local" only flag to /stats.
index f215c22528a75ad439cb2cf095d7ca9e92e11bc6..42817a72b1ab0335a67be603c5c173292deb4a0e 100644 (file)
@@ -162,14 +162,8 @@ int sockaddr_from_irc(struct sockaddr_in *v4, const struct irc_sockaddr *irc, in
 
 #endif
 
-/*
- * This is part of the STATS replies. There is no official numeric for this
- * since this isn't an official command, in much the same way as HASH isn't.
- * It is also possible that some systems wont support this call or have
- * different field names for "struct rusage".
- * -avalon
- */
-/** Send resource usage information to a client.
+#ifdef DEBUGMODE
+/** Send resource usage information to an enumerator function.
  * @param[in] cptr Client requesting information.
  * @param[in] uptime Wall time in seconds since the server started.
  * @param[in] enumerator Function to call to send a line to \a cptr.
@@ -262,6 +256,7 @@ int os_get_rusage(struct Client *cptr, int uptime, EnumFn enumerator)
 #endif /* HAVE_GETRUSAGE */
   return 1;
 }
+#endif
 
 /** Look up the most recent socket error for a socket file descriptor.
  * @param[in] fd File descriptor to check.