From a6661f91205678c55c1e14511d73c376d3b3d90e Mon Sep 17 00:00:00 2001 From: Dave West Date: Thu, 29 Oct 2009 17:40:39 +0000 Subject: [PATCH] Don't register commands twice, only register them before threading begins. Because its filling up my log unecesarily. --- citadel/citserver.c | 36 ++++++++++++++++++----------------- citadel/control.c | 4 +++- citadel/euidindex.c | 4 +++- citadel/file_ops.c | 26 +++++++++++++------------ citadel/msgbase.c | 26 +++++++++++++------------ citadel/policy.c | 6 ++++-- citadel/room_ops.c | 44 ++++++++++++++++++++++--------------------- citadel/sysdep.c | 7 ++++--- citadel/user_ops.c | 46 +++++++++++++++++++++++---------------------- 9 files changed, 108 insertions(+), 91 deletions(-) diff --git a/citadel/citserver.c b/citadel/citserver.c index 13a40afc2..2f5f24690 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -1168,23 +1168,25 @@ void do_async_loop(void) { CTDL_MODULE_INIT(citserver) { - CtdlRegisterProtoHook(cmd_noop, "NOOP", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_qnop, "QNOP", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_quit, "QUIT", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_lout, "LOUT", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_asyn, "ASYN", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_info, "INFO", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_mesg, "MESG", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_emsg, "EMSG", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_echo, "ECHO", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_more, "MORE", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_iden, "IDEN", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_ipgm, "IPGM", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_term, "TERM", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_down, "DOWN", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_halt, "HALT", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_scdn, "SCDN", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_time, "TIME", "Autoconverted. TODO: document me."); + if (!threading) { + CtdlRegisterProtoHook(cmd_noop, "NOOP", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_qnop, "QNOP", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_quit, "QUIT", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_lout, "LOUT", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_asyn, "ASYN", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_info, "INFO", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_mesg, "MESG", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_emsg, "EMSG", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_echo, "ECHO", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_more, "MORE", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_iden, "IDEN", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_ipgm, "IPGM", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_term, "TERM", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_down, "DOWN", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_halt, "HALT", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_scdn, "SCDN", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_time, "TIME", "Autoconverted. TODO: document me."); + } /* return our Subversion id for the Log */ return "$Id$"; } diff --git a/citadel/control.c b/citadel/control.c index 2599815dc..eef125c72 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -719,7 +719,9 @@ void cmd_conf(char *argbuf) CTDL_MODULE_INIT(control) { - CtdlRegisterProtoHook(cmd_conf, "CONF", "Autoconverted. TODO: document me."); + if (!threading) { + CtdlRegisterProtoHook(cmd_conf, "CONF", "Autoconverted. TODO: document me."); + } /* return our Subversion id for the Log */ return "$Id$"; } diff --git a/citadel/euidindex.c b/citadel/euidindex.c index ce46a459f..d68718e16 100644 --- a/citadel/euidindex.c +++ b/citadel/euidindex.c @@ -254,7 +254,9 @@ void cmd_euid(char *cmdbuf) { CTDL_MODULE_INIT(euidindex) { - CtdlRegisterProtoHook(cmd_euid, "EUID", "Autoconverted. TODO: document me."); + if (!threading) { + CtdlRegisterProtoHook(cmd_euid, "EUID", "Autoconverted. TODO: document me."); + } /* return our Subversion id for the Log */ return "$Id$"; } diff --git a/citadel/file_ops.c b/citadel/file_ops.c index 99009a1b7..21b7dfe83 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -782,18 +782,20 @@ void cmd_nuop(char *cmdbuf) CTDL_MODULE_INIT(file_ops) { - CtdlRegisterProtoHook(cmd_delf, "DELF", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_movf, "MOVF", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_open, "OPEN", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_clos, "CLOS", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_uopn, "UOPN", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_ucls, "UCLS", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_read, "READ", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_writ, "WRIT", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_oimg, "OIMG", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_ndop, "NDOP", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_nuop, "NUOP", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_uimg, "UIMG", "Autoconverted. TODO: document me."); + if (!threading) { + CtdlRegisterProtoHook(cmd_delf, "DELF", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_movf, "MOVF", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_open, "OPEN", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_clos, "CLOS", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_uopn, "UOPN", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_ucls, "UCLS", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_read, "READ", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_writ, "WRIT", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_oimg, "OIMG", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_ndop, "NDOP", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_nuop, "NUOP", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_uimg, "UIMG", "Autoconverted. TODO: document me."); + } /* return our Subversion id for the Log */ return "$Id$"; } diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 2de00fd29..9f4c5f222 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -4811,18 +4811,20 @@ void cmd_isme(char *argbuf) { CTDL_MODULE_INIT(msgbase) { - CtdlRegisterProtoHook(cmd_msgs, "MSGS", "Output a list of messages in the current room"); - CtdlRegisterProtoHook(cmd_msg0, "MSG0", "Output a message in plain text format"); - CtdlRegisterProtoHook(cmd_msg2, "MSG2", "Output a message in RFC822 format"); - CtdlRegisterProtoHook(cmd_msg3, "MSG3", "Output a message in raw format (deprecated)"); - CtdlRegisterProtoHook(cmd_msg4, "MSG4", "Output a message in the client's preferred format"); - CtdlRegisterProtoHook(cmd_msgp, "MSGP", "Select preferred format for MSG4 output"); - CtdlRegisterProtoHook(cmd_opna, "OPNA", "Open an attachment for download"); - CtdlRegisterProtoHook(cmd_dlat, "DLAT", "Download an attachment"); - CtdlRegisterProtoHook(cmd_ent0, "ENT0", "Enter a message"); - CtdlRegisterProtoHook(cmd_dele, "DELE", "Delete a message"); - CtdlRegisterProtoHook(cmd_move, "MOVE", "Move or copy a message to another room"); - CtdlRegisterProtoHook(cmd_isme, "ISME", "Determine whether an email address belongs to a user"); + if (!threading) { + CtdlRegisterProtoHook(cmd_msgs, "MSGS", "Output a list of messages in the current room"); + CtdlRegisterProtoHook(cmd_msg0, "MSG0", "Output a message in plain text format"); + CtdlRegisterProtoHook(cmd_msg2, "MSG2", "Output a message in RFC822 format"); + CtdlRegisterProtoHook(cmd_msg3, "MSG3", "Output a message in raw format (deprecated)"); + CtdlRegisterProtoHook(cmd_msg4, "MSG4", "Output a message in the client's preferred format"); + CtdlRegisterProtoHook(cmd_msgp, "MSGP", "Select preferred format for MSG4 output"); + CtdlRegisterProtoHook(cmd_opna, "OPNA", "Open an attachment for download"); + CtdlRegisterProtoHook(cmd_dlat, "DLAT", "Download an attachment"); + CtdlRegisterProtoHook(cmd_ent0, "ENT0", "Enter a message"); + CtdlRegisterProtoHook(cmd_dele, "DELE", "Delete a message"); + CtdlRegisterProtoHook(cmd_move, "MOVE", "Move or copy a message to another room"); + CtdlRegisterProtoHook(cmd_isme, "ISME", "Determine whether an email address belongs to a user"); + } /* return our Subversion id for the Log */ return "$Id$"; diff --git a/citadel/policy.c b/citadel/policy.c index 1c8ca4a2a..acfb91644 100644 --- a/citadel/policy.c +++ b/citadel/policy.c @@ -185,8 +185,10 @@ void cmd_spex(char *argbuf) { CTDL_MODULE_INIT(policy) { - CtdlRegisterProtoHook(cmd_gpex, "GPEX", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_spex, "SPEX", "Autoconverted. TODO: document me."); + if (!threading) { + CtdlRegisterProtoHook(cmd_gpex, "GPEX", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_spex, "SPEX", "Autoconverted. TODO: document me."); + } /* return our Subversion id for the Log */ return "$Id$"; } diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 5c2dec0c3..42c67e758 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -2240,27 +2240,29 @@ void cmd_eflr(char *argbuf) CTDL_MODULE_INIT(room_ops) { - CtdlRegisterProtoHook(cmd_lrms, "LRMS", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_lkra, "LKRA", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_lkrn, "LKRN", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_lkro, "LKRO", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_lzrm, "LZRM", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_lprm, "LPRM", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_goto, "GOTO", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_whok, "WHOK", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_rdir, "RDIR", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_getr, "GETR", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_setr, "SETR", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_geta, "GETA", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_seta, "SETA", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_rinf, "RINF", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_kill, "KILL", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_cre8, "CRE8", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_einf, "EINF", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_lflr, "LFLR", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_cflr, "CFLR", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_kflr, "KFLR", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_eflr, "EFLR", "Autoconverted. TODO: document me."); + if (!threading) { + CtdlRegisterProtoHook(cmd_lrms, "LRMS", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_lkra, "LKRA", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_lkrn, "LKRN", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_lkro, "LKRO", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_lzrm, "LZRM", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_lprm, "LPRM", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_goto, "GOTO", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_whok, "WHOK", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_rdir, "RDIR", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_getr, "GETR", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_setr, "SETR", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_geta, "GETA", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_seta, "SETA", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_rinf, "RINF", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_kill, "KILL", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_cre8, "CRE8", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_einf, "EINF", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_lflr, "LFLR", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_cflr, "CFLR", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_kflr, "KFLR", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_eflr, "EFLR", "Autoconverted. TODO: document me."); + } /* return our Subversion id for the Log */ return "$Id$"; } diff --git a/citadel/sysdep.c b/citadel/sysdep.c index c4aa2063c..732dbc420 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -1008,9 +1008,10 @@ void checkcrash(void) " The Citadel server process (citserver) terminated unexpectedly." "\n \n" " This could be the result of a bug in the server program, or some external " - "factor. You can obtain more information about this by enabling core dumps. " - "For more information, please see: " - "http://citadel.org/doku.php/faq:mastering_your_os:gdb#how.do.i.make.my.system.produce.core-files" + "factor.\n \n" + " You can obtain more information about this by enabling core dumps.\n \n" + " For more information, please see:\n \n" + " http://citadel.org/doku.php/faq:mastering_your_os:gdb#how.do.i.make.my.system.produce.core-files" "\n \n" " If you have already done this, the core dump is likely to be found at %score.%d\n" , diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 91e3d077a..efa5d241a 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -2071,28 +2071,30 @@ void cmd_renu(char *cmdbuf) CTDL_MODULE_INIT(user_ops) { - CtdlRegisterProtoHook(cmd_user, "USER", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_pass, "PASS", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_creu, "CREU", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_setp, "SETP", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_getu, "GETU", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_setu, "SETU", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_slrp, "SLRP", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_invt, "INVT", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_kick, "KICK", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_forg, "FORG", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_gnur, "GNUR", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_vali, "VALI", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_list, "LIST", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_chek, "CHEK", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_qusr, "QUSR", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_agup, "AGUP", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_asup, "ASUP", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_seen, "SEEN", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_gtsn, "GTSN", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_view, "VIEW", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_renu, "RENU", "Autoconverted. TODO: document me."); - CtdlRegisterProtoHook(cmd_newu, "NEWU", "Autoconverted. TODO: document me."); + if (!threading) { + CtdlRegisterProtoHook(cmd_user, "USER", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_pass, "PASS", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_creu, "CREU", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_setp, "SETP", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_getu, "GETU", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_setu, "SETU", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_slrp, "SLRP", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_invt, "INVT", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_kick, "KICK", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_forg, "FORG", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_gnur, "GNUR", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_vali, "VALI", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_list, "LIST", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_chek, "CHEK", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_qusr, "QUSR", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_agup, "AGUP", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_asup, "ASUP", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_seen, "SEEN", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_gtsn, "GTSN", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_view, "VIEW", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_renu, "RENU", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_newu, "NEWU", "Autoconverted. TODO: document me."); + } /* return our Subversion id for the Log */ return "$Id$"; } -- 2.30.2