X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fserv_extensions.h;h=8591737ae9ede824231639d3c38a50a6545914a4;hb=55013f95f08eafe1b375df4241e8defe387c6cdc;hp=0ef8e14083337390e5c3b697eebe785c6c3565c0;hpb=94ef7564c4585129c6025debe797c8dade2e6885;p=citadel.git diff --git a/citadel/serv_extensions.h b/citadel/serv_extensions.h index 0ef8e1408..8591737ae 100644 --- a/citadel/serv_extensions.h +++ b/citadel/serv_extensions.h @@ -15,8 +15,20 @@ /* */ -typedef void (*CtdlDbgFunction) (void); - +typedef void (*CtdlDbgFunction) (const int); + +extern int DebugModules; +#define MDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (DebugModules != 0)) + +#define MOD_syslog(LEVEL, FORMAT, ...) \ + MDBGLOG(LEVEL) syslog(LEVEL, \ + "Modules: " FORMAT, __VA_ARGS__) + +#define MODM_syslog(LEVEL, FORMAT) \ + MDBGLOG(LEVEL) syslog(LEVEL, \ + "Modules: " FORMAT); + + /* @@ -44,6 +56,13 @@ struct CleanupFunctionHook { extern CleanupFunctionHook *CleanupHookTable; +typedef struct __LogDebugEntry { + CtdlDbgFunction F; + const char *Name; + long Len; + const int *LogP; +} LogDebugEntry; +extern HashList *LogDebugEntryTable; void initialize_server_extensions(void); int DLoader_Exec_Cmd(char *cmdbuf); char *Dynamic_Module_Init(void); @@ -51,6 +70,9 @@ char *Dynamic_Module_Init(void); void CtdlDestroySessionHooks(void); void PerformSessionHooks(int EventType); +int CheckTDAPVeto (int DBType, StrBuf *ErrMsg); +void CtdlDestroyTDAPVetoHooks(void); + void CtdlDestroyUserHooks(void); void PerformUserHooks(struct ctdluser *usbuf, int EventType); @@ -60,7 +82,7 @@ void CtdlDestroyXmsgHooks(void); void CtdlDestroyMessageHook(void); -int PerformMessageHooks(struct CtdlMessage *, int EventType); +int PerformMessageHooks(struct CtdlMessage *, recptypes *recps, int EventType); void CtdlDestroyNetprocHooks(void); @@ -85,7 +107,7 @@ void CtdlDestroySearchHooks(void); void CtdlDestroyFixedOutputHooks(void); int PerformFixedOutputHooks(char *, char *, int); -void CtdlRegisterDebugFlagHook(const char *Name, long len, CtdlDbgFunction F); +void CtdlRegisterDebugFlagHook(const char *Name, long len, CtdlDbgFunction F, const int *); void CtdlSetDebugLogFacilities(const char **Str, long n); void CtdlDestroyDebugTable(void);