X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fserv_extensions.c;h=18e42583002fd618c03dfb93c030575860226b85;hb=a3df97101b1442ebc2e332f42aa0d5897e265d32;hp=5ea03d6737ed7d5ccd8a099f09729b7c1b808e2d;hpb=abea530f3028d5726ce605ca0e822ae1a0d4efe4;p=citadel.git diff --git a/citadel/serv_extensions.c b/citadel/serv_extensions.c index 5ea03d673..18e425830 100644 --- a/citadel/serv_extensions.c +++ b/citadel/serv_extensions.c @@ -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; pnext) { if (fcn->order == p) { @@ -1062,7 +1040,6 @@ int PerformXmsgHooks(char *sender, char *recp, char *msg) */ if (total_sent) break; } - CtdlThreadPopName(); return total_sent; }