Removed the PushName and PopName debugging macros that I added. They
authorDave West <davew@uncensored.citadel.org>
Fri, 30 Nov 2007 23:31:56 +0000 (23:31 +0000)
committerDave West <davew@uncensored.citadel.org>
Fri, 30 Nov 2007 23:31:56 +0000 (23:31 +0000)
cause a boom in the auto purger due to some change in the tsd I think.
Anyway, they've servered their purpose now.

citadel/housekeeping.c
citadel/include/ctdl_module.h
citadel/journaling.c
citadel/serv_extensions.c

index 8d65e0ec7b10792e31b86673c7154d11a29518e5..b0d4a1d265c93b1b977f3a1678224dc153864cd1 100644 (file)
@@ -140,8 +140,6 @@ void do_housekeeping(void) {
        int do_perminute_housekeeping_now = 0;
        time_t now;
 
-       CtdlThreadPushName("do_housekeeping");
-       
        /*
         * We do it this way instead of wrapping the whole loop in an
         * S_HOUSEKEEPING critical section because it eliminates the need to
@@ -160,7 +158,6 @@ void do_housekeeping(void) {
        end_critical_section(S_HOUSEKEEPING);
 
        if (do_housekeeping_now == 0) {
-               CtdlThreadPopName();
                return;
        }
 
@@ -184,5 +181,4 @@ void do_housekeeping(void) {
         * All done.
         */
        housekeeping_in_progress = 0;
-       CtdlThreadPopName();
 }
index c83555c8fcab15b29b55e7a34f1c4e77c5e17bc6..bab177d69ec70b4d57fe279a22c86f1a2f6f5f9c 100644 (file)
@@ -127,17 +127,4 @@ int CtdlThreadSelect(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds
        struct CtdlThreadNode *_this_cit_thread;\
        _this_cit_thread = CtdlThreadSelf()
 
-
-#ifdef WITH_THREADLOG
-#define CtdlThreadPushName(NAME) \
-       char *_push_name; \
-       _push_name = CtdlThreadName(CtdlThreadSelf(), NAME)
-
-#define CtdlThreadPopName() \
-       free (CtdlThreadName(CtdlThreadSelf(), _push_name))
-#else
-#define CtdlThreadPushName(NAME)
-#define CtdlThreadPopName()
-#endif
-
 #endif /* CTDL_MODULE_H */
index 267d781a4e2b8b8e425280f3f0cd0c0d991b4be9..a0ebeb21d0c747bcf47f3c1f413225d6d01412eb 100644 (file)
@@ -262,7 +262,6 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
 void JournalRunQueue(void) {
        struct jnlq *jptr = NULL;
 
-       CtdlThreadPushName("JournalRunQueue");
        while (jnlq != NULL) {
                begin_critical_section(S_JOURNAL_QUEUE);
                if (jnlq != NULL) {
@@ -272,7 +271,6 @@ void JournalRunQueue(void) {
                end_critical_section(S_JOURNAL_QUEUE);
                JournalRunQueueMsg(jptr);
        }
-       CtdlThreadPopName();
 }
 
 
index 5ea03d6737ed7d5ccd8a099f09729b7c1b808e2d..18e42583002fd618c03dfb93c030575860226b85 100644 (file)
@@ -922,29 +922,22 @@ void PerformSessionHooks(int EventType)
 {
        struct SessionFunctionHook *fcn = NULL;
 
-       CtdlThreadPushName("PerformSessionHooks");
-       
        for (fcn = SessionHookTable; fcn != NULL; fcn = fcn->next) {
                if (fcn->eventtype == EventType) {
                        (*fcn->h_function_pointer) ();
                }
        }
-       CtdlThreadPopName();
-       
 }
 
 void PerformUserHooks(struct ctdluser *usbuf, int EventType)
 {
        struct UserFunctionHook *fcn = NULL;
 
-       CtdlThreadPushName("PerformUserHooks");
-       
        for (fcn = UserHookTable; fcn != NULL; fcn = fcn->next) {
                if (fcn->eventtype == EventType) {
                        (*fcn->h_function_pointer) (usbuf);
                }
        }
-       CtdlThreadPopName();
 }
 
 int PerformMessageHooks(struct CtdlMessage *msg, int EventType)
@@ -952,8 +945,6 @@ int PerformMessageHooks(struct CtdlMessage *msg, int EventType)
        struct MessageFunctionHook *fcn = NULL;
        int total_retval = 0;
 
-       CtdlThreadPushName("PerformMessageHooks");
-       
        /* Other code may elect to protect this message from server-side
         * handlers; if this is the case, don't do anything.
        lprintf(CTDL_DEBUG, "** Event type is %d, flags are %d\n",
@@ -961,7 +952,6 @@ int PerformMessageHooks(struct CtdlMessage *msg, int EventType)
         */
        if (msg->cm_flags & CM_SKIP_HOOKS) {
                lprintf(CTDL_DEBUG, "Skipping hooks\n");
-               CtdlThreadPopName();
                return(0);
        }
 
@@ -978,7 +968,6 @@ int PerformMessageHooks(struct CtdlMessage *msg, int EventType)
         * this is an EVT_BEFORESAVE event, a nonzero return code will cause
         * the save operation to abort.
         */
-       CtdlThreadPopName();
        return total_retval;
 }
 
@@ -988,8 +977,6 @@ int PerformRoomHooks(struct ctdlroom *target_room)
        struct RoomFunctionHook *fcn;
        int total_retval = 0;
 
-       CtdlThreadPushName("PerformRoomHooks");
-       
        lprintf(CTDL_DEBUG, "Performing room hooks for <%s>\n", target_room->QRname);
 
        for (fcn = RoomHookTable; fcn != NULL; fcn = fcn->next) {
@@ -998,7 +985,6 @@ int PerformRoomHooks(struct ctdlroom *target_room)
 
        /* Return the sum of the return codes from the hook functions.
         */
-       CtdlThreadPopName();
        return total_retval;
 }
 
@@ -1008,8 +994,6 @@ int PerformNetprocHooks(struct CtdlMessage *msg, char *target_room)
        struct NetprocFunctionHook *fcn;
        int total_retval = 0;
 
-       CtdlThreadPushName("PerformNetprocHooks");
-       
        for (fcn = NetprocHookTable; fcn != NULL; fcn = fcn->next) {
                total_retval = total_retval +
                        (*fcn->h_function_pointer) (msg, target_room);
@@ -1018,7 +1002,6 @@ int PerformNetprocHooks(struct CtdlMessage *msg, char *target_room)
        /* Return the sum of the return codes from the hook functions.
         * A nonzero return code will cause the message to *not* be imported.
         */
-       CtdlThreadPopName();
        return total_retval;
 }
 
@@ -1027,12 +1010,9 @@ void PerformDeleteHooks(char *room, long msgnum)
 {
        struct DeleteFunctionHook *fcn;
 
-       CtdlThreadPushName("PerformDeleteHooks");
-       
        for (fcn = DeleteHookTable; fcn != NULL; fcn = fcn->next) {
                (*fcn->h_function_pointer) (room, msgnum);
        }
-       CtdlThreadPopName();
 }
 
 
@@ -1045,8 +1025,6 @@ int PerformXmsgHooks(char *sender, char *recp, char *msg)
        int total_sent = 0;
        int p;
 
-       CtdlThreadPushName("PerformXmsgHooks");
-       
        for (p=0; p<MAX_XMSG_PRI; ++p) {
                for (fcn = XmsgHookTable; fcn != NULL; fcn = fcn->next) {
                        if (fcn->order == p) {
@@ -1062,7 +1040,6 @@ int PerformXmsgHooks(char *sender, char *recp, char *msg)
                 */
                if (total_sent) break;
        }
-       CtdlThreadPopName();
        return total_sent;
 }