]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_extensions.c
* Backport the important part of r8717 to stable. I forgot I did this on Friday...
[citadel.git] / citadel / serv_extensions.c
index 421824a9b0ce156b4f90b44b837ba41a7668883c..0617cce0a750a0622258352736915230c5acdb35 100644 (file)
@@ -78,7 +78,7 @@ char *ErrPortShort = "We couldn't bind all ports you configured to be provided b
 char *ErrPortWhere = "Admin->System Preferences->Network.\n\nThe failed ports and sockets are: ";
 char *ErrPortHint = "If you want citadel to provide you with that functionality, "
 "check the output of \"netstat -lnp\" on linux Servers or \"netstat -na\" on *BSD"
-" and stop the programm, that binds these ports. You should eventually remove "
+" and stop the programm, that binds these ports.\n You should eventually remove "
 " their initscripts in /etc/init.d so that you won't get this trouble once more.\n"
 " After that goto Administration -> Shutdown Citadel to make Citadel retry to bind this port.\n";
 
@@ -836,7 +836,7 @@ void CtdlDestroyServiceHook(void)
        ServiceHookTable = NULL;
 }
 
-void CtdlRegisterSearchFuncHook(void (*fcn_ptr)(int *, long **, char *), char *name)
+void CtdlRegisterSearchFuncHook(void (*fcn_ptr)(int *, long **, const char *), char *name)
 {
        struct SearchFunctionHook *newfcn;
 
@@ -854,7 +854,7 @@ void CtdlRegisterSearchFuncHook(void (*fcn_ptr)(int *, long **, char *), char *n
        CtdlLogPrintf(CTDL_INFO, "Registered a new search function (%s)\n", name);
 }
 
-void CtdlUnregisterSearchFuncHook(void (*fcn_ptr)(int *, long **, char *), char *name)
+void CtdlUnregisterSearchFuncHook(void (*fcn_ptr)(int *, long **, const char *), char *name)
 {
        struct SearchFunctionHook *cur, *p;
        
@@ -871,7 +871,7 @@ void CtdlUnregisterSearchFuncHook(void (*fcn_ptr)(int *, long **, char *), char
        }
 }
 
-void CtdlModuleDoSearch(int *num_msgs, long **search_msgs, char *search_string, char *func_name)
+void CtdlModuleDoSearch(int *num_msgs, long **search_msgs, const char *search_string, const char *func_name)
 {
        struct SearchFunctionHook *fcn = NULL;
 
@@ -891,6 +891,9 @@ void PerformSessionHooks(int EventType)
 
        for (fcn = SessionHookTable; fcn != NULL; fcn = fcn->next) {
                if (fcn->eventtype == EventType) {
+                       if (EventType == EVT_TIMER) {
+                               citthread_setspecific(MyConKey, NULL);  /* for every hook */
+                       }
                        (*fcn->h_function_pointer) ();
                }
        }