Generate wiki diffs using a temp file instead of a big string of realloc() calls.
[citadel.git] / citadel / serv_extensions.c
index 33c83f73887f9003c19a288aa036daf88884e5a1..76dbacb4a028ebe476ceda0e6abab84ddf09088a 100644 (file)
@@ -969,8 +969,7 @@ int PerformMessageHooks(struct CtdlMessage *msg, int EventType)
 
        /* Other code may elect to protect this message from server-side
         * handlers; if this is the case, don't do anything.
-       syslog(LOG_DEBUG, "** Event type is %d, flags are %d\n",
-               EventType, msg->cm_flags);
+       syslog(LOG_DEBUG, "** Event type is %d, flags are %d\n", EventType, msg->cm_flags);
         */
        if (msg->cm_flags & CM_SKIP_HOOKS) {
                syslog(LOG_DEBUG, "Skipping hooks\n");
@@ -979,10 +978,13 @@ int PerformMessageHooks(struct CtdlMessage *msg, int EventType)
 
        /* Otherwise, run all the hooks appropriate to this event type.
         */
+       int num_hooks_processed = 0;
        for (fcn = MessageHookTable; fcn != NULL; fcn = fcn->next) {
                if (fcn->eventtype == EventType) {
-                       total_retval = total_retval +
-                               (*fcn->h_function_pointer) (msg);
+                       total_retval = total_retval + (*fcn->h_function_pointer) (msg);
+                       syslog(LOG_DEBUG, "%d hooks completed, total_retval=%d",
+                               ++num_hooks_processed, total_retval
+                       );
                }
        }