#include <string.h>
#include <limits.h>
#include <ctype.h>
+#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "serv_extensions.h"
#include "sysdep_decls.h"
#include "msgbase.h"
-#include "tools.h"
#include "config.h"
#include "modules/crypto/serv_crypto.h" /* Needed until a universal crypto startup hook is implimented for CtdlStartTLS */
struct ServiceFunctionHook *ServiceHookTable = NULL;
struct FixedOutputHook *FixedOutputTable = NULL;
struct RoomFunctionHook *RoomHookTable = NULL;
-struct MaintenanceThreadHook *MaintenanceThreadHookTable = NULL;
struct SearchFunctionHook *SearchFunctionHookTable = NULL;
struct ProtoFunctionHook {
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 "
-" their initscripts in /etc/init.d so that you won't get this trouble once more.\n";
+" 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";
void LogPrintMessages(long err)
}
+int DLoader_Exec_Cmd(char *cmdbuf)
+{
+ struct ProtoFunctionHook *p;
+
+ for (p = ProtoHookList; p; p = p->next) {
+ if (!strncasecmp(cmdbuf, p->cmd, 4)) {
+ p->handler(&cmdbuf[5]);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
void CtdlRegisterProtoHook(void (*handler) (char *), char *cmd, char *desc)
{
struct ProtoFunctionHook *p;
}
-int DLoader_Exec_Cmd(char *cmdbuf)
-{
- struct ProtoFunctionHook *p;
-
- for (p = ProtoHookList; p; p = p->next) {
- if (!strncasecmp(cmdbuf, p->cmd, 4)) {
- p->handler(&cmdbuf[5]);
- return 1;
- }
- }
- return 0;
-}
-
-
void CtdlRegisterCleanupHook(void (*fcn_ptr) (void))
{
return total_sent;
}
-void CtdlRegisterMaintenanceThread(char *name, void *(*thread_proc)(void *arg))
-{
- struct MaintenanceThreadHook *newfcn;
-
- newfcn = (struct MaintenanceThreadHook *)
- malloc(sizeof(struct MaintenanceThreadHook));
- newfcn->name = name;
- newfcn->next = MaintenanceThreadHookTable;
- newfcn->fcn_ptr = thread_proc;
- MaintenanceThreadHookTable = newfcn;
-
- lprintf(CTDL_INFO, "Registered a new maintenance thread function\n");
-}