Don't register commands twice, only register them before threading begins.
authorDave West <davew@uncensored.citadel.org>
Thu, 29 Oct 2009 17:40:39 +0000 (17:40 +0000)
committerDave West <davew@uncensored.citadel.org>
Thu, 29 Oct 2009 17:40:39 +0000 (17:40 +0000)
Because its filling up my log unecesarily.

citadel/citserver.c
citadel/control.c
citadel/euidindex.c
citadel/file_ops.c
citadel/msgbase.c
citadel/policy.c
citadel/room_ops.c
citadel/sysdep.c
citadel/user_ops.c

index 13a40afc20ab02ec6f876bde253e715f7a281f13..2f5f24690fa0b0277967e9344db044c48c9a3632 100644 (file)
@@ -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$";
 }
index 2599815dc38b7b9951767a98eec486f684d8b18c..eef125c7266bf59e6bbfd97dac1a4eb8826f114d 100644 (file)
@@ -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$";
 }
index ce46a459feea5f2ee25f161f7871dfff851331f3..d68718e16804c7bb04fd532d7dd64565c4cd5dfc 100644 (file)
@@ -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$";
 }
index 99009a1b7494b32dc1c5da90fea1fd34c4d90ac8..21b7dfe835dcf60d390971b43c9f6cf3cd4663b9 100644 (file)
@@ -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$";
 }
index 2de00fd2909475770ebbcdfb4b616487e03b04e7..9f4c5f222be5cae08cb154852d5cbe05564cf9e7 100644 (file)
@@ -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$";
index 1c8ca4a2a32ef5fc0e1568c6588d8a85aa7066a0..acfb916442e3880bec85fbeda49178751a5b6d12 100644 (file)
@@ -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$";
 }
index 5c2dec0c3cd5e61a647bc7fb05a4208392d7fb58..42c67e758e815db6fa8bd3fa1da0b6b3032121c6 100644 (file)
@@ -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$";
 }
index c4aa2063c062db9727e26fb0b70bf8ad65b2a4f3..732dbc4206a727e4ee86bb7b3529762dad6bfa39 100644 (file)
@@ -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"
                        ,
index 91e3d077a56934c3c72b4f0ef6d4feb1071d61d7..efa5d241ae16b84fa0f3107295b40628b9586e57 100644 (file)
@@ -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$";
 }