return 0;
}
+void CtdlDestroyDirectoryServiceFuncs(void)
+{
+ struct DirectoryServiceHook *cur, *next;
+
+ cur = DirectoryServiceHookList;
+ DirectoryServiceHookList = NULL;
+ while (cur)
+ {
+ next = cur->next;
+ CtdlLogPrintf(CTDL_INFO, "Destroyed directory service function for module %s.\n", cur->module);
+ free(cur);
+ cur = next;
+ }
+}
+
/*
* Dirty hack until we impliment a hook mechanism for this
*/
void CtdlModuleDoSearch(int *num_msgs, long **search_msgs, char *search_string, char *func_name);
+void CtdlDestroyDirectoryServiceFuncs(void);
+
#endif /* SERV_EXTENSIONS_H */
/* We need to update the ContextList because some modules may want to itterate it
* Question is should we NULL it before iterating here or should we just keep updating it
* as we remove items?
+ *
+ * Answer is to NULL it first to prevent modules from doing any actions on the list at all
*/
+ ContextList=NULL;
while (ptr != NULL){
/* Remove the session from the active list */
rem = ptr->next;
RemoveContext(ptr);
free (ptr);
ptr = rem;
- ContextList = rem; // Update ContextList since a module may try to iterate the list.
}
}
CtdlDestroyFixedOutputHooks();
CtdlDestroySessionHooks();
CtdlDestroyServiceHook();
+ CtdlDestroyRoomHooks();
+ CtdlDestroyDirectoryServiceFuncs();
#ifdef HAVE_BACKTRACE
eCrash_Uninit();
#endif