From: Kevin L. Mitchell Date: Sat, 11 Dec 2004 05:14:07 +0000 (+0000) Subject: Author: Kev X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=fc21303989a07d6091ef684150db29c49f682614 Author: Kev Log message: Implement a custom assert() macro (in ircd_log.h). This variant of assert() is similar to the system assert(), in that it ends with a call to abort() if the assertion fails; however, logging is done through the logging subsystem. (A sentinel is added to (hopefully) prevent an assertion failure somewhere in the logging subsystem from entering into an infinite loop; if this happens, there will be no output at all, but abort() will still be called.) git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1271 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 1b391a3..0a26e29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-12-11 Kevin L Mitchell + + * ircd/*.c: use new assert() in ircd_log.h in preference to system + assert() + + * ircd/umkpasswd.c: use new assert in ircd_log.h; add necessary + glue so that umkpasswd will successfully compile and link + + * ircd/test/ircd_chattr_t.c: comment out include of assert.h since + there are no calls to assert() + + * ircd/ircd_log.c: add sentinel (log_inassert) to prevent assert() + from looping should there be an assertion failure somewhere in the + logging subsystem + + * include/ircd_log.h: custom implementation of assert() that calls + log_write() + 2004-11-21 Michael Poole * ircd/channel.c (mode_parse_upass): Allow forced mode changes to diff --git a/include/ircd_log.h b/include/ircd_log.h index 20f0a25..956908c 100644 --- a/include/ircd_log.h +++ b/include/ircd_log.h @@ -26,6 +26,10 @@ #include /* va_list */ #define INCLUDED_stdarg_h #endif +#ifndef INCLUDED_stdlib_h +#include /* abort */ +#define INCLUDED_stdlib_h +#endif struct Client; @@ -107,4 +111,47 @@ extern void log_feature_unmark(void); extern int log_feature_mark(int flag); extern void log_feature_report(struct Client *to, int flag); +extern int log_inassert; + #endif /* INCLUDED_ircd_log_h */ + +/* The rest of this file implements our own custom version of assert. + * This version will log the assertion failure using the LS_SYSTEM log + * stream, thus putting the assertion failure message into a useful + * place, rather than elsewhere, as is currently the case... + */ + +/* We've been included twice; clean up before creating assert() again */ +#ifdef _ircd_log_assert +# undef _ircd_log_assert +# undef assert +#endif + +/* gcc has a nice way of hinting that an expression is expected to + * produce a specific result, which can improve optimization. + * Unfortunately, all the world's not gcc (at least, not yet), and not + * all gcc's support it. I don't know exactly when it appeared, but + * it does appear to be in all versions from 3 and up. So, we'll + * create a dummy define if (we think) this version of gcc doesn't + * have it... + */ +#ifndef _log_builtin_expect +# define _log_builtin_expect +# if __GNUC__ < 3 +# define __builtin_expect(expr, expect) (expr) +# endif +#endif + +/* let's try not to clash with the system assert()... */ +#ifndef assert +# ifdef NDEBUG +# define assert(expr) ((void)0) +# else +# define assert(expr) \ + ((void)(__builtin_expect(!!(expr), 1) ? 0 : \ + (__builtin_expect(log_inassert, 0) ? (abort(), 0) : \ + ((log_inassert = 1), /* inhibit looping in assert() */ \ + log_write(LS_SYSTEM, L_CRIT, 0, "Assertion failure at %s:%d: " \ + "\"%s\"", __FILE__, __LINE__, #expr), abort(), 0)))) +# endif +#endif diff --git a/ircd/IPcheck.c b/ircd/IPcheck.c index d336753..49a448a 100644 --- a/ircd/IPcheck.c +++ b/ircd/IPcheck.c @@ -31,11 +31,12 @@ #include "ircd_alloc.h" #include "ircd_events.h" #include "ircd_features.h" +#include "ircd_log.h" #include "s_debug.h" /* Debug */ #include "s_user.h" /* TARGET_DELAY */ #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /** Stores free target information for a particular user. */ diff --git a/ircd/channel.c b/ircd/channel.c index 90eed24..4ff88ac 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -53,7 +53,7 @@ #include "sys.h" #include "whowas.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/class.c b/ircd/class.c index 53fd65e..e0fe644 100644 --- a/ircd/class.c +++ b/ircd/class.c @@ -27,6 +27,7 @@ #include "ircd.h" #include "ircd_alloc.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "list.h" @@ -35,7 +36,7 @@ #include "s_debug.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /** List of all connection classes. */ static struct ConnectionClass* connClassList; diff --git a/ircd/client.c b/ircd/client.c index 8568345..6860d0c 100644 --- a/ircd/client.c +++ b/ircd/client.c @@ -26,6 +26,7 @@ #include "class.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "list.h" #include "msgq.h" @@ -35,7 +36,7 @@ #include "send.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /** Find the shortest non-zero ping time attached to a client. diff --git a/ircd/dbuf.c b/ircd/dbuf.c index 13933f1..a7abe5b 100644 --- a/ircd/dbuf.c +++ b/ircd/dbuf.c @@ -26,10 +26,11 @@ #include "ircd_alloc.h" #include "ircd_chattr.h" #include "ircd_features.h" +#include "ircd_log.h" #include "send.h" #include "sys.h" /* MIN */ -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/destruct_event.c b/ircd/destruct_event.c index 32bb3fb..b16fd98 100644 --- a/ircd/destruct_event.c +++ b/ircd/destruct_event.c @@ -27,10 +27,11 @@ #include "ircd_alloc.h" #include "ircd.h" #include "ircd_events.h" +#include "ircd_log.h" #include "send.h" #include "msg.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /** Structure describing a destruction event. */ diff --git a/ircd/engine_devpoll.c b/ircd/engine_devpoll.c index 9c4d49c..daceb69 100644 --- a/ircd/engine_devpoll.c +++ b/ircd/engine_devpoll.c @@ -30,7 +30,7 @@ #include "ircd_log.h" #include "s_debug.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/engine_epoll.c b/ircd/engine_epoll.c index c44e135..4a929ab 100644 --- a/ircd/engine_epoll.c +++ b/ircd/engine_epoll.c @@ -29,7 +29,7 @@ #include "ircd_log.h" #include "s_debug.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #ifdef HAVE_STDINT_H diff --git a/ircd/engine_kqueue.c b/ircd/engine_kqueue.c index 914a09c..4e419f8 100644 --- a/ircd/engine_kqueue.c +++ b/ircd/engine_kqueue.c @@ -30,7 +30,7 @@ #include "ircd_log.h" #include "s_debug.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/engine_poll.c b/ircd/engine_poll.c index 58b3f9e..e0c4bf4 100644 --- a/ircd/engine_poll.c +++ b/ircd/engine_poll.c @@ -29,7 +29,7 @@ #include "ircd_log.h" #include "s_debug.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/engine_select.c b/ircd/engine_select.c index e759967..205283c 100644 --- a/ircd/engine_select.c +++ b/ircd/engine_select.c @@ -35,7 +35,7 @@ # endif #endif -#include +/* #include -- Now using assert in ircd_log.h */ #include #include /* needed for bzero() on OS X */ #include diff --git a/ircd/fileio.c b/ircd/fileio.c index 3866786..2684a38 100644 --- a/ircd/fileio.c +++ b/ircd/fileio.c @@ -26,8 +26,9 @@ #include "fileio.h" #include "ircd_alloc.h" /* MyMalloc, MyFree */ +#include "ircd_log.h" /* assert */ -#include /* assert */ +/* #include -- Now using assert in ircd_log.h */ /* assert */ #include /* O_RDONLY, O_WRONLY, ... */ #include /* BUFSIZ, EOF */ #include /* struct stat */ diff --git a/ircd/gline.c b/ircd/gline.c index e0a7278..68b7a9e 100644 --- a/ircd/gline.c +++ b/ircd/gline.c @@ -46,7 +46,7 @@ #include "sys.h" /* FALSE bleah */ #include "whocmds.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/hash.c b/ircd/hash.c index aaf017b..ff777ae 100644 --- a/ircd/hash.c +++ b/ircd/hash.c @@ -26,6 +26,7 @@ #include "channel.h" #include "ircd_alloc.h" #include "ircd_chattr.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "ircd.h" @@ -36,7 +37,7 @@ #include "struct.h" #include "sys.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/ircd.c b/ircd/ircd.c index 686e874..175f1e8 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -61,7 +61,7 @@ #include "version.h" #include "whowas.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/ircd_alloc.c b/ircd/ircd_alloc.c index 62944c5..5dd4ef7 100644 --- a/ircd/ircd_alloc.c +++ b/ircd/ircd_alloc.c @@ -26,10 +26,11 @@ #include "config.h" #include "ircd_alloc.h" +#include "ircd_log.h" #include "ircd_string.h" #include "s_debug.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include static void nomem_handler(void); diff --git a/ircd/ircd_auth.c b/ircd/ircd_auth.c index b6fc1ed..03c59b8 100644 --- a/ircd/ircd_auth.c +++ b/ircd/ircd_auth.c @@ -42,7 +42,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/ircd_crypt.c b/ircd/ircd_crypt.c index c96c564..8036ac0 100644 --- a/ircd/ircd_crypt.c +++ b/ircd/ircd_crypt.c @@ -47,6 +47,7 @@ #include "ircd_crypt.h" #include "ircd_alloc.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_string.h" #include "s_debug.h" @@ -55,7 +56,7 @@ #include "ircd_crypt_plain.h" #include "ircd_crypt_smd5.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/ircd_crypt_native.c b/ircd/ircd_crypt_native.c index e3a8fbe..25d2b4e 100644 --- a/ircd/ircd_crypt_native.c +++ b/ircd/ircd_crypt_native.c @@ -31,10 +31,11 @@ #include "config.h" #include "ircd_crypt.h" #include "ircd_crypt_native.h" +#include "ircd_log.h" #include "s_debug.h" #include "ircd_alloc.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #ifdef HAVE_CRYPT_H #include diff --git a/ircd/ircd_crypt_plain.c b/ircd/ircd_crypt_plain.c index 03cb3e1..2b96a73 100644 --- a/ircd/ircd_crypt_plain.c +++ b/ircd/ircd_crypt_plain.c @@ -27,10 +27,11 @@ #include "config.h" #include "ircd_crypt.h" #include "ircd_crypt_plain.h" +#include "ircd_log.h" #include "s_debug.h" #include "ircd_alloc.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /** Just sends back the supplied password. diff --git a/ircd/ircd_crypt_smd5.c b/ircd/ircd_crypt_smd5.c index af583ff..6ef7f4f 100644 --- a/ircd/ircd_crypt_smd5.c +++ b/ircd/ircd_crypt_smd5.c @@ -39,11 +39,12 @@ #include "config.h" #include "ircd_crypt.h" #include "ircd_crypt_smd5.h" +#include "ircd_log.h" #include "ircd_md5.h" #include "s_debug.h" #include "ircd_alloc.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/ircd_events.c b/ircd/ircd_events.c index ac61fd3..29b81a5 100644 --- a/ircd/ircd_events.c +++ b/ircd/ircd_events.c @@ -30,7 +30,7 @@ #include "ircd_snprintf.h" #include "s_debug.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/ircd_features.c b/ircd/ircd_features.c index 9c2ad48..a7dac35 100644 --- a/ircd/ircd_features.c +++ b/ircd/ircd_features.c @@ -46,7 +46,7 @@ #include "sys.h" /* FALSE bleah */ #include "whowas.h" /* whowas_realloc */ -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/ircd_log.c b/ircd/ircd_log.c index aa819b8..66b3318 100644 --- a/ircd/ircd_log.c +++ b/ircd/ircd_log.c @@ -38,7 +38,7 @@ #include "send.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include @@ -52,6 +52,8 @@ #include #include +int log_inassert = 0; + #define LOG_BUFSIZE 2048 /**< Maximum length for a log message. */ /** Select default log level cutoff. */ diff --git a/ircd/ircd_relay.c b/ircd/ircd_relay.c index 5061a4b..0cb7e80 100644 --- a/ircd/ircd_relay.c +++ b/ircd/ircd_relay.c @@ -52,6 +52,7 @@ #include "ircd.h" #include "ircd_chattr.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" @@ -63,7 +64,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/ircd_reply.c b/ircd/ircd_reply.c index 440d84a..d5641be 100644 --- a/ircd/ircd_reply.c +++ b/ircd/ircd_reply.c @@ -29,6 +29,7 @@ #include "ircd_reply.h" #include "client.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_snprintf.h" #include "msg.h" #include "msgq.h" @@ -37,7 +38,7 @@ #include "s_debug.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /** Report a protocol violation warning to anyone listening. This can diff --git a/ircd/ircd_res.c b/ircd/ircd_res.c index 0fd56b7..5ca6fea 100644 --- a/ircd/ircd_res.c +++ b/ircd/ircd_res.c @@ -40,7 +40,7 @@ #include "res.h" #include "ircd_reslib.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/ircd_signal.c b/ircd/ircd_signal.c index afe0b96..9c868b2 100644 --- a/ircd/ircd_signal.c +++ b/ircd/ircd_signal.c @@ -25,10 +25,11 @@ #include "ircd.h" #include "ircd_events.h" +#include "ircd_log.h" #include "ircd_signal.h" #include "s_conf.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /** Counts various types of signals that we receive. */ diff --git a/ircd/ircd_snprintf.c b/ircd/ircd_snprintf.c index 3c7cfb0..42f0e10 100644 --- a/ircd/ircd_snprintf.c +++ b/ircd/ircd_snprintf.c @@ -24,10 +24,11 @@ #include "client.h" #include "channel.h" +#include "ircd_log.h" #include "ircd_snprintf.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/ircd_string.c b/ircd/ircd_string.c index 37e4b6c..4f90c9f 100644 --- a/ircd/ircd_string.c +++ b/ircd/ircd_string.c @@ -28,7 +28,7 @@ #include "ircd_log.h" #include "res.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/jupe.c b/ircd/jupe.c index 3d69a74..8cdaa9e 100644 --- a/ircd/jupe.c +++ b/ircd/jupe.c @@ -43,7 +43,7 @@ #include "struct.h" #include "sys.h" /* FALSE bleah */ -#include +/* #include -- Now using assert in ircd_log.h */ #include /** List of jupes. */ diff --git a/ircd/list.c b/ircd/list.c index 2bb9cd8..b013058 100644 --- a/ircd/list.c +++ b/ircd/list.c @@ -28,6 +28,7 @@ #include "ircd.h" #include "ircd_alloc.h" #include "ircd_events.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "listener.h" @@ -44,7 +45,7 @@ #include "struct.h" #include "whowas.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* offsetof */ #include /* close */ #include diff --git a/ircd/listener.c b/ircd/listener.c index b949579..7663820 100644 --- a/ircd/listener.c +++ b/ircd/listener.c @@ -28,6 +28,7 @@ #include "ircd_alloc.h" #include "ircd_events.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_osdep.h" #include "ircd_reply.h" #include "ircd_snprintf.h" @@ -41,7 +42,7 @@ #include "send.h" #include "sys.h" /* MAXCLIENTS */ -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/m_account.c b/ircd/m_account.c index 3b00133..5040a52 100644 --- a/ircd/m_account.c +++ b/ircd/m_account.c @@ -82,6 +82,7 @@ #include "client.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -90,7 +91,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_admin.c b/ircd/m_admin.c index dd8d0f4..bfaa78c 100644 --- a/ircd/m_admin.c +++ b/ircd/m_admin.c @@ -85,6 +85,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "msg.h" #include "numeric.h" @@ -92,7 +93,7 @@ #include "s_conf.h" #include "s_user.h" -#include +/* #include -- Now using assert in ircd_log.h */ static int send_admin_info(struct Client* sptr) { diff --git a/ircd/m_asll.c b/ircd/m_asll.c index 5da2c87..cfe1e41 100644 --- a/ircd/m_asll.c +++ b/ircd/m_asll.c @@ -83,6 +83,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" @@ -93,7 +94,7 @@ #include "s_bsd.h" #include "s_user.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include static int send_asll_reply(struct Client *from, struct Client *to, char *server, diff --git a/ircd/m_away.c b/ircd/m_away.c index 00fc7ab..ef440c1 100644 --- a/ircd/m_away.c +++ b/ircd/m_away.c @@ -84,6 +84,7 @@ #include "client.h" #include "ircd.h" #include "ircd_alloc.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -92,7 +93,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_burst.c b/ircd/m_burst.c index 62a3e36..6618ebc 100644 --- a/ircd/m_burst.c +++ b/ircd/m_burst.c @@ -87,6 +87,7 @@ #include "ircd.h" #include "ircd_alloc.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "list.h" @@ -100,7 +101,7 @@ #include "struct.h" #include "ircd_snprintf.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/m_clearmode.c b/ircd/m_clearmode.c index c8d3516..35ddea9 100644 --- a/ircd/m_clearmode.c +++ b/ircd/m_clearmode.c @@ -98,7 +98,7 @@ #include "s_conf.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * do_clearmode(struct Client *cptr, struct Client *sptr, diff --git a/ircd/m_close.c b/ircd/m_close.c index b121a83..d8e5194 100644 --- a/ircd/m_close.c +++ b/ircd/m_close.c @@ -83,12 +83,13 @@ #include "client.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "numeric.h" #include "s_bsd.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * mo_close - oper message handler diff --git a/ircd/m_connect.c b/ircd/m_connect.c index 55feddd..d87b20a 100644 --- a/ircd/m_connect.c +++ b/ircd/m_connect.c @@ -99,7 +99,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_cprivmsg.c b/ircd/m_cprivmsg.c index f714d8f..afda1bc 100644 --- a/ircd/m_cprivmsg.c +++ b/ircd/m_cprivmsg.c @@ -82,11 +82,12 @@ #include "config.h" #include "client.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "s_user.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_cprivmsg - generic message handler diff --git a/ircd/m_create.c b/ircd/m_create.c index 96cf3af..09f5395 100644 --- a/ircd/m_create.c +++ b/ircd/m_create.c @@ -85,6 +85,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -95,7 +96,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_defaults.c b/ircd/m_defaults.c index 9afe5c0..9a85c82 100644 --- a/ircd/m_defaults.c +++ b/ircd/m_defaults.c @@ -26,6 +26,7 @@ #include "client.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "numeric.h" #include "numnicks.h" @@ -33,7 +34,7 @@ #include "supported.h" #include "version.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_functions execute protocol messages on this server: diff --git a/ircd/m_destruct.c b/ircd/m_destruct.c index 4104af1..8fca75a 100644 --- a/ircd/m_destruct.c +++ b/ircd/m_destruct.c @@ -27,6 +27,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -36,7 +37,7 @@ #include "channel.h" #include "destruct_event.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_desynch.c b/ircd/m_desynch.c index e02a4d4..a8533ac 100644 --- a/ircd/m_desynch.c +++ b/ircd/m_desynch.c @@ -84,6 +84,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -92,7 +93,7 @@ #include "s_bsd.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * ms_desynch - server message handler diff --git a/ircd/m_die.c b/ircd/m_die.c index 9b3519d..e8f9ccc 100644 --- a/ircd/m_die.c +++ b/ircd/m_die.c @@ -83,6 +83,7 @@ #include "client.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -91,7 +92,7 @@ #include "s_bsd.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* diff --git a/ircd/m_endburst.c b/ircd/m_endburst.c index 68ac9e1..aea0dec 100644 --- a/ircd/m_endburst.c +++ b/ircd/m_endburst.c @@ -85,6 +85,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -92,7 +93,7 @@ #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * ms_end_of_burst - server message handler diff --git a/ircd/m_error.c b/ircd/m_error.c index b84b20f..561fbcf 100644 --- a/ircd/m_error.c +++ b/ircd/m_error.c @@ -85,6 +85,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_alloc.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" @@ -93,7 +94,7 @@ #include "s_misc.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_get.c b/ircd/m_get.c index 2982995..ac7e6e5 100644 --- a/ircd/m_get.c +++ b/ircd/m_get.c @@ -85,13 +85,14 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * mo_get - oper message handler diff --git a/ircd/m_gline.c b/ircd/m_gline.c index 636879c..ab60a1a 100644 --- a/ircd/m_gline.c +++ b/ircd/m_gline.c @@ -86,6 +86,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" @@ -96,7 +97,7 @@ #include "s_misc.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_help.c b/ircd/m_help.c index 1c09943..482ad8e 100644 --- a/ircd/m_help.c +++ b/ircd/m_help.c @@ -84,6 +84,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -91,7 +92,7 @@ #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_help - generic message handler diff --git a/ircd/m_info.c b/ircd/m_info.c index 5a547ec..0f18c43 100644 --- a/ircd/m_info.c +++ b/ircd/m_info.c @@ -83,6 +83,7 @@ #include "client.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -94,7 +95,7 @@ #include "send.h" #include "version.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_info - generic message handler diff --git a/ircd/m_invite.c b/ircd/m_invite.c index 4a99cfe..2b8cbcf 100644 --- a/ircd/m_invite.c +++ b/ircd/m_invite.c @@ -86,6 +86,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "list.h" @@ -96,7 +97,7 @@ #include "send.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_invite - generic message handler diff --git a/ircd/m_ison.c b/ircd/m_ison.c index 1dfa6f2..e5f232f 100644 --- a/ircd/m_ison.c +++ b/ircd/m_ison.c @@ -84,13 +84,14 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msgq.h" #include "numeric.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_join.c b/ircd/m_join.c index 76eb138..59c667d 100644 --- a/ircd/m_join.c +++ b/ircd/m_join.c @@ -88,6 +88,7 @@ #include "ircd.h" #include "ircd_chattr.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -97,7 +98,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_jupe.c b/ircd/m_jupe.c index 7d89ee5..688dde3 100644 --- a/ircd/m_jupe.c +++ b/ircd/m_jupe.c @@ -87,6 +87,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" @@ -97,7 +98,7 @@ #include "s_misc.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_kick.c b/ircd/m_kick.c index 56fad42..5af0a4d 100644 --- a/ircd/m_kick.c +++ b/ircd/m_kick.c @@ -85,6 +85,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -93,7 +94,7 @@ #include "send.h" #include "ircd_features.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_kick - generic message handler diff --git a/ircd/m_kill.c b/ircd/m_kill.c index b46b782..1957fa1 100644 --- a/ircd/m_kill.c +++ b/ircd/m_kill.c @@ -96,7 +96,7 @@ #include "send.h" #include "whowas.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_links.c b/ircd/m_links.c index cd90145..68bf87f 100644 --- a/ircd/m_links.c +++ b/ircd/m_links.c @@ -85,6 +85,7 @@ #include "ircd.h" #include "ircd_defs.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" @@ -95,7 +96,7 @@ #include "send.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_links - generic message handler diff --git a/ircd/m_list.c b/ircd/m_list.c index 9c96a11..471743b 100644 --- a/ircd/m_list.c +++ b/ircd/m_list.c @@ -97,7 +97,7 @@ #include "s_bsd.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_lusers.c b/ircd/m_lusers.c index 07c562b..b1b7afd 100644 --- a/ircd/m_lusers.c +++ b/ircd/m_lusers.c @@ -84,6 +84,7 @@ #include "client.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -94,7 +95,7 @@ #include "s_serv.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_lusers - generic message handler diff --git a/ircd/m_map.c b/ircd/m_map.c index ca1f0bf..ffbcb18 100644 --- a/ircd/m_map.c +++ b/ircd/m_map.c @@ -85,6 +85,7 @@ #include "ircd.h" #include "ircd_defs.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_snprintf.h" #include "ircd_string.h" @@ -97,7 +98,7 @@ #include "send.h" #include "querycmds.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_mode.c b/ircd/m_mode.c index c0b5148..fb957a4 100644 --- a/ircd/m_mode.c +++ b/ircd/m_mode.c @@ -86,6 +86,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -96,7 +97,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_motd.c b/ircd/m_motd.c index e2cd87d..f431df1 100644 --- a/ircd/m_motd.c +++ b/ircd/m_motd.c @@ -84,6 +84,7 @@ #include "client.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" @@ -97,7 +98,7 @@ #include "send.h" #include -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_motd - generic message handler diff --git a/ircd/m_names.c b/ircd/m_names.c index 2ee0c65..bddfd27 100644 --- a/ircd/m_names.c +++ b/ircd/m_names.c @@ -85,6 +85,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -93,7 +94,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_nick.c b/ircd/m_nick.c index d993a66..18ecca5 100644 --- a/ircd/m_nick.c +++ b/ircd/m_nick.c @@ -87,6 +87,7 @@ #include "ircd.h" #include "ircd_chattr.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -98,7 +99,7 @@ #include "send.h" #include "sys.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_notice.c b/ircd/m_notice.c index 0d76c2f..6f2d295 100644 --- a/ircd/m_notice.c +++ b/ircd/m_notice.c @@ -83,6 +83,7 @@ #include "client.h" #include "ircd_chattr.h" +#include "ircd_log.h" #include "ircd_relay.h" #include "ircd_reply.h" #include "ircd_string.h" @@ -91,7 +92,7 @@ #include "numeric.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #if !defined(XXX_BOGUS_TEMP_HACK) diff --git a/ircd/m_oper.c b/ircd/m_oper.c index d0e85a1..3e561eb 100644 --- a/ircd/m_oper.c +++ b/ircd/m_oper.c @@ -100,7 +100,7 @@ #include "s_misc.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_opmode.c b/ircd/m_opmode.c index 0f7ae4b..142f38b 100644 --- a/ircd/m_opmode.c +++ b/ircd/m_opmode.c @@ -87,6 +87,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -95,7 +96,7 @@ #include "send.h" #include "s_conf.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * ms_opmode - server message handler diff --git a/ircd/m_part.c b/ircd/m_part.c index 00da1ef..fd90fbb 100644 --- a/ircd/m_part.c +++ b/ircd/m_part.c @@ -85,13 +85,14 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_pass.c b/ircd/m_pass.c index 5848c0e..d25d8a9 100644 --- a/ircd/m_pass.c +++ b/ircd/m_pass.c @@ -82,11 +82,12 @@ #include "config.h" #include "client.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * mr_pass - registration message handler diff --git a/ircd/m_ping.c b/ircd/m_ping.c index 609e00d..6766b60 100644 --- a/ircd/m_ping.c +++ b/ircd/m_ping.c @@ -134,6 +134,7 @@ #include "client.h" #include "hash.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "ircd.h" @@ -144,7 +145,7 @@ #include "s_debug.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_pong.c b/ircd/m_pong.c index 026cd6b..e149c23 100644 --- a/ircd/m_pong.c +++ b/ircd/m_pong.c @@ -84,6 +84,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -93,7 +94,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_privmsg.c b/ircd/m_privmsg.c index 28e6fd4..b9928dc 100644 --- a/ircd/m_privmsg.c +++ b/ircd/m_privmsg.c @@ -85,6 +85,7 @@ #include "ircd.h" #include "ircd_chattr.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_relay.h" #include "ircd_reply.h" #include "ircd_string.h" @@ -93,7 +94,7 @@ #include "numeric.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_privs.c b/ircd/m_privs.c index f72f38c..b36e8b8 100644 --- a/ircd/m_privs.c +++ b/ircd/m_privs.c @@ -84,13 +84,14 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * mo_privs - report operator privileges diff --git a/ircd/m_proto.c b/ircd/m_proto.c index 3a9f3ca..4bf0a06 100644 --- a/ircd/m_proto.c +++ b/ircd/m_proto.c @@ -28,6 +28,7 @@ #include "ircd.h" #include "ircd_alloc.h" #include "ircd_chattr.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -39,7 +40,7 @@ #include "supported.h" #include "version.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/m_pseudo.c b/ircd/m_pseudo.c index 544fe62..b4a17a4 100644 --- a/ircd/m_pseudo.c +++ b/ircd/m_pseudo.c @@ -85,6 +85,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_relay.h" #include "ircd_reply.h" #include "ircd_string.h" @@ -95,7 +96,7 @@ #include "s_conf.h" #include "s_user.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_pseudo - generic service message handler diff --git a/ircd/m_quit.c b/ircd/m_quit.c index a96d434..9ccc361 100644 --- a/ircd/m_quit.c +++ b/ircd/m_quit.c @@ -84,12 +84,13 @@ #include "channel.h" #include "client.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_string.h" #include "struct.h" #include "s_misc.h" #include "ircd_reply.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_rehash.c b/ircd/m_rehash.c index e14df38..8e8c2db 100644 --- a/ircd/m_rehash.c +++ b/ircd/m_rehash.c @@ -91,7 +91,7 @@ #include "s_conf.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * mo_rehash - oper message handler diff --git a/ircd/m_reset.c b/ircd/m_reset.c index 3c48e17..624cb86 100644 --- a/ircd/m_reset.c +++ b/ircd/m_reset.c @@ -85,13 +85,14 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * mo_reset - oper message handler diff --git a/ircd/m_restart.c b/ircd/m_restart.c index b031161..08246db 100644 --- a/ircd/m_restart.c +++ b/ircd/m_restart.c @@ -90,7 +90,7 @@ #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * mo_restart - oper message handler diff --git a/ircd/m_rping.c b/ircd/m_rping.c index 3841390..1db4b23 100644 --- a/ircd/m_rping.c +++ b/ircd/m_rping.c @@ -84,6 +84,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -93,7 +94,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* diff --git a/ircd/m_rpong.c b/ircd/m_rpong.c index fc2cb42..4f32f79 100644 --- a/ircd/m_rpong.c +++ b/ircd/m_rpong.c @@ -84,6 +84,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -92,7 +93,7 @@ #include "opercmds.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * ms_rpong - server message handler diff --git a/ircd/m_server.c b/ircd/m_server.c index a15f66b..af7a010 100644 --- a/ircd/m_server.c +++ b/ircd/m_server.c @@ -49,7 +49,7 @@ #include "send.h" #include "userload.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_set.c b/ircd/m_set.c index 4cca91a..861f228 100644 --- a/ircd/m_set.c +++ b/ircd/m_set.c @@ -85,13 +85,14 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * mo_set - oper message handler diff --git a/ircd/m_settime.c b/ircd/m_settime.c index 30643a7..39ec6aa 100644 --- a/ircd/m_settime.c +++ b/ircd/m_settime.c @@ -85,6 +85,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_snprintf.h" #include "ircd_string.h" @@ -96,7 +97,7 @@ #include "send.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_silence.c b/ircd/m_silence.c index a3baa51..7a78d14 100644 --- a/ircd/m_silence.c +++ b/ircd/m_silence.c @@ -32,6 +32,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_snprintf.h" #include "ircd_string.h" @@ -43,7 +44,7 @@ #include "send.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_squit.c b/ircd/m_squit.c index c0282fe..ce4dd99 100644 --- a/ircd/m_squit.c +++ b/ircd/m_squit.c @@ -28,6 +28,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_chattr.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" @@ -38,7 +39,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/m_stats.c b/ircd/m_stats.c index 34a7464..73cfe81 100644 --- a/ircd/m_stats.c +++ b/ircd/m_stats.c @@ -84,6 +84,7 @@ #include "client.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -93,7 +94,7 @@ #include "send.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_time.c b/ircd/m_time.c index d216465..ca8e830 100644 --- a/ircd/m_time.c +++ b/ircd/m_time.c @@ -84,6 +84,7 @@ #include "client.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -93,7 +94,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_time - generic message handler diff --git a/ircd/m_tmpl.c b/ircd/m_tmpl.c index 24aaaaa..88480ee 100644 --- a/ircd/m_tmpl.c +++ b/ircd/m_tmpl.c @@ -84,13 +84,14 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_tmpl - generic message handler diff --git a/ircd/m_topic.c b/ircd/m_topic.c index 2a4c559..d0c674c 100644 --- a/ircd/m_topic.c +++ b/ircd/m_topic.c @@ -86,6 +86,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -93,7 +94,7 @@ #include "numnicks.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* for atoi() */ static void do_settopic(struct Client *sptr, struct Client *cptr, diff --git a/ircd/m_trace.c b/ircd/m_trace.c index e311682..e261ac5 100644 --- a/ircd/m_trace.c +++ b/ircd/m_trace.c @@ -86,6 +86,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" @@ -98,7 +99,7 @@ #include "send.h" #include "version.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include void do_trace(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) diff --git a/ircd/m_uping.c b/ircd/m_uping.c index cc10cf9..8854a24 100644 --- a/ircd/m_uping.c +++ b/ircd/m_uping.c @@ -84,6 +84,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" @@ -96,7 +97,7 @@ #include "uping.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/m_user.c b/ircd/m_user.c index 06a8917..33dd470 100644 --- a/ircd/m_user.c +++ b/ircd/m_user.c @@ -85,6 +85,7 @@ #include "client.h" #include "ircd.h" #include "ircd_chattr.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "numeric.h" @@ -94,7 +95,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/m_userhost.c b/ircd/m_userhost.c index 9f93381..0d49fce 100644 --- a/ircd/m_userhost.c +++ b/ircd/m_userhost.c @@ -82,6 +82,7 @@ #include "config.h" #include "client.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msgq.h" @@ -89,7 +90,7 @@ #include "s_user.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ static void userhost_formatter(struct Client* cptr, struct Client *sptr, struct MsgBuf* mb) { diff --git a/ircd/m_userip.c b/ircd/m_userip.c index 80078ff..82f2b45 100644 --- a/ircd/m_userip.c +++ b/ircd/m_userip.c @@ -85,12 +85,13 @@ #include "ircd_reply.h" #include "ircd_string.h" #include "ircd_features.h" +#include "ircd_log.h" #include "msgq.h" #include "numeric.h" #include "s_user.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ static void userip_formatter(struct Client* cptr, struct Client *sptr, struct MsgBuf* mb) { diff --git a/ircd/m_version.c b/ircd/m_version.c index 39e6cd3..340991b 100644 --- a/ircd/m_version.c +++ b/ircd/m_version.c @@ -85,6 +85,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_snprintf.h" #include "ircd_string.h" @@ -97,7 +98,7 @@ #include "supported.h" #include "version.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_version - generic message handler diff --git a/ircd/m_wallchops.c b/ircd/m_wallchops.c index d9732be..a3a9133 100644 --- a/ircd/m_wallchops.c +++ b/ircd/m_wallchops.c @@ -85,6 +85,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -93,7 +94,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_wallchops - local generic message handler diff --git a/ircd/m_wallops.c b/ircd/m_wallops.c index 5c98a24..dfa10e4 100644 --- a/ircd/m_wallops.c +++ b/ircd/m_wallops.c @@ -82,13 +82,14 @@ #include "config.h" #include "client.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" #include "numeric.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* diff --git a/ircd/m_wallusers.c b/ircd/m_wallusers.c index e5e0cdb..dc53baa 100644 --- a/ircd/m_wallusers.c +++ b/ircd/m_wallusers.c @@ -82,13 +82,14 @@ #include "config.h" #include "client.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" #include "numeric.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* diff --git a/ircd/m_wallvoices.c b/ircd/m_wallvoices.c index 4dfad26..2fdc5f3 100644 --- a/ircd/m_wallvoices.c +++ b/ircd/m_wallvoices.c @@ -84,6 +84,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -92,7 +93,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_wallvoices - local generic message handler diff --git a/ircd/m_who.c b/ircd/m_who.c index 04075ca..35b4093 100644 --- a/ircd/m_who.c +++ b/ircd/m_who.c @@ -96,7 +96,7 @@ #include "send.h" #include "whocmds.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include diff --git a/ircd/m_whois.c b/ircd/m_whois.c index 343ca82..5ba4a46 100644 --- a/ircd/m_whois.c +++ b/ircd/m_whois.c @@ -86,6 +86,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" @@ -96,7 +97,7 @@ #include "send.h" #include "whocmds.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/m_whowas.c b/ircd/m_whowas.c index f6a4cdf..bea409a 100644 --- a/ircd/m_whowas.c +++ b/ircd/m_whowas.c @@ -85,6 +85,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -95,7 +96,7 @@ #include "send.h" #include "whowas.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /* diff --git a/ircd/memdebug.c b/ircd/memdebug.c index 0c84ea1..8e99820 100644 --- a/ircd/memdebug.c +++ b/ircd/memdebug.c @@ -1,11 +1,12 @@ #include #include "ircd.h" #include "ircd_alloc.h" +#include "ircd_log.h" #include "client.h" #include "s_debug.h" #include -#include +/* #include -- Now using assert in ircd_log.h */ #ifdef MDEBUG diff --git a/ircd/motd.c b/ircd/motd.c index 8359f21..dc92c97 100644 --- a/ircd/motd.c +++ b/ircd/motd.c @@ -34,6 +34,7 @@ #include "ircd.h" #include "ircd_alloc.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "match.h" @@ -46,7 +47,7 @@ #include "s_stats.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/msgq.c b/ircd/msgq.c index 2eeda99..1119214 100644 --- a/ircd/msgq.c +++ b/ircd/msgq.c @@ -27,6 +27,7 @@ #include "ircd_alloc.h" #include "ircd_defs.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_snprintf.h" #include "numeric.h" @@ -34,7 +35,7 @@ #include "s_debug.h" #include "s_stats.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/numnicks.c b/ircd/numnicks.c index f84c335..931c1ca 100644 --- a/ircd/numnicks.c +++ b/ircd/numnicks.c @@ -26,6 +26,7 @@ #include "client.h" #include "ircd.h" #include "ircd_alloc.h" +#include "ircd_log.h" #include "ircd_string.h" #include "match.h" #include "s_bsd.h" @@ -33,7 +34,7 @@ #include "s_misc.h" #include "struct.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/os_generic.c b/ircd/os_generic.c index 9191b38..3f52e76 100644 --- a/ircd/os_generic.c +++ b/ircd/os_generic.c @@ -27,6 +27,7 @@ #include "ircd_osdep.h" #include "msgq.h" +#include "ircd_log.h" #include "res.h" #include "s_bsd.h" #include "sys.h" @@ -37,7 +38,7 @@ * Solaris requires sys/time.h before struct rusage (indirectly) in * netinet/in.h. */ -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/packet.c b/ircd/packet.c index 87853f6..7634408 100644 --- a/ircd/packet.c +++ b/ircd/packet.c @@ -27,12 +27,13 @@ #include "client.h" #include "ircd.h" #include "ircd_chattr.h" +#include "ircd_log.h" #include "parse.h" #include "s_bsd.h" #include "s_misc.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /** Add a certain number of bytes to a client's received statistics. * @param[in,out] cptr Client to update. diff --git a/ircd/parse.c b/ircd/parse.c index 693d5ec..ac69fe6 100644 --- a/ircd/parse.c +++ b/ircd/parse.c @@ -32,6 +32,7 @@ #include "ircd_alloc.h" #include "ircd_chattr.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -52,7 +53,7 @@ #include "whocmds.h" #include "whowas.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/s_auth.c b/ircd/s_auth.c index 5baa898..2d67d3f 100644 --- a/ircd/s_auth.c +++ b/ircd/s_auth.c @@ -61,7 +61,7 @@ #include #include #include -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/s_bsd.c b/ircd/s_bsd.c index 6a3d9e4..97c63b0 100644 --- a/ircd/s_bsd.c +++ b/ircd/s_bsd.c @@ -59,7 +59,7 @@ #include "version.h" #include -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/s_conf.c b/ircd/s_conf.c index 160b4e0..12a5ac8 100644 --- a/ircd/s_conf.c +++ b/ircd/s_conf.c @@ -56,7 +56,7 @@ #include "struct.h" #include "sys.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/s_debug.c b/ircd/s_debug.c index 6f1266c..15ea2f5 100644 --- a/ircd/s_debug.c +++ b/ircd/s_debug.c @@ -50,7 +50,7 @@ #include "sys.h" #include "whowas.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/s_err.c b/ircd/s_err.c index 85f1883..041520e 100644 --- a/ircd/s_err.c +++ b/ircd/s_err.c @@ -23,9 +23,10 @@ #include "config.h" #include "numeric.h" +#include "ircd_log.h" #include "s_debug.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include /** Array of Numeric replies, indexed by numeric. */ diff --git a/ircd/s_misc.c b/ircd/s_misc.c index 1b892fc..1476f2c 100644 --- a/ircd/s_misc.c +++ b/ircd/s_misc.c @@ -58,7 +58,7 @@ #include "uping.h" #include "userload.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/s_serv.c b/ircd/s_serv.c index 1da2bfd..2fb0794 100644 --- a/ircd/s_serv.c +++ b/ircd/s_serv.c @@ -34,6 +34,7 @@ #include "hash.h" #include "ircd.h" #include "ircd_alloc.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "ircd_snprintf.h" @@ -57,7 +58,7 @@ #include "sys.h" #include "userload.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/s_user.c b/ircd/s_user.c index 5e6ebe3..3e7fd6b 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -66,7 +66,7 @@ #include "handlers.h" /* m_motd and m_lusers */ -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/send.c b/ircd/send.c index 54c38a8..4dc21ea 100644 --- a/ircd/send.c +++ b/ircd/send.c @@ -29,6 +29,7 @@ #include "client.h" #include "ircd.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_snprintf.h" #include "ircd_string.h" #include "list.h" @@ -43,7 +44,7 @@ #include "struct.h" #include "sys.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include diff --git a/ircd/test/ircd_chattr_t.c b/ircd/test/ircd_chattr_t.c index 806a3e6..04051e2 100644 --- a/ircd/test/ircd_chattr_t.c +++ b/ircd/test/ircd_chattr_t.c @@ -2,7 +2,7 @@ * ircd_chattr_t.c - Test file for character attributes */ #include "ircd_chattr.h" -#include +/* #include -- not used here */ #include typedef int (*EvalFn)(char); diff --git a/ircd/umkpasswd.c b/ircd/umkpasswd.c index 29a2bea..aa2f7f6 100644 --- a/ircd/umkpasswd.c +++ b/ircd/umkpasswd.c @@ -26,10 +26,11 @@ #include #include #include -#include +/* #include -- Now using assert in ircd_log.h */ /* ircu headers */ #include "ircd_alloc.h" +#include "ircd_log.h" /* for ircd's assert.h */ #include "ircd_string.h" #include "umkpasswd.h" #include "s_debug.h" @@ -44,6 +45,7 @@ /* bleah, evil globals */ umkpasswd_conf_t* umkpasswd_conf; crypt_mechs_t* crypt_mechs_root; +int log_inassert = 0; void copyright(void) { @@ -94,6 +96,17 @@ int err = errno; errno = err; } +/* quick implementation of log_write() for assert() call */ +void log_write(enum LogSys subsys, enum LogLevel severity, + unsigned int flags, const char *fmt, ...) +{ + va_list vl; + va_start(vl, fmt); + vfprintf(stderr, fmt, vl); + fprintf(stderr, "\n"); + va_end(vl); +} + /* quick and dirty salt generator */ char *make_salt(const char *salts) { diff --git a/ircd/uping.c b/ircd/uping.c index 3342c8a..c2d70ab 100644 --- a/ircd/uping.c +++ b/ircd/uping.c @@ -43,7 +43,7 @@ #include "sys.h" #include -#include +/* #include -- Now using assert in ircd_log.h */ #include #include #include diff --git a/ircd/whowas.c b/ircd/whowas.c index b8fc173..4546b57 100644 --- a/ircd/whowas.c +++ b/ircd/whowas.c @@ -40,6 +40,7 @@ #include "ircd_alloc.h" #include "ircd_chattr.h" #include "ircd_features.h" +#include "ircd_log.h" #include "ircd_string.h" #include "list.h" #include "numeric.h" @@ -51,7 +52,7 @@ #include "sys.h" #include "msg.h" -#include +/* #include -- Now using assert in ircd_log.h */ #include #include