]> code.citadel.org Git - citadel.git/blobdiff - citadel/server.h
* Removed the built-in memory leak checker. It wasn't threadsafe and
[citadel.git] / citadel / server.h
index a3073b5d618f01c6b27130ab3c61df4f84029779..c543de3b77abafd1207ac311ef8bd5d91df40ac1 100644 (file)
@@ -1,10 +1,5 @@
 /* $Id$ */
 
-/* Uncomment this if you want to track memory leaks.
- * This incurs some overhead, so don't use it unless you're debugging the code!
- */
-/* #define DEBUG_MEMORY_LEAKS */
-
 
 #ifndef SERVER_H
 #define SERVER_H
@@ -156,7 +151,8 @@ typedef struct CitContext t_context;
 /* Values for CitContext.state */
 enum {
        CON_IDLE,               /* This context is doing nothing */
-       CON_EXECUTING           /* This context is bound to a thread */
+       CON_READY,              /* This context is ready-to-run */
+       CON_EXECUTING,          /* This context is bound to a thread */
 };
 
 
@@ -215,6 +211,7 @@ enum {
        S_NETCONFIGS,
        S_PUBLIC_CLIENTS,
        S_LDAP,
+       S_FLOORCACHE,
        MAX_SEMAPHORES
 };
 
@@ -321,13 +318,13 @@ extern struct SessionFunctionHook *SessionHookTable;
  */
 struct UserFunctionHook {
        struct UserFunctionHook *next;
-       void (*h_function_pointer) (char *username, long usernum);
+       void (*h_function_pointer) (struct ctdluser *usbuf);
        int eventtype;
 };
 extern struct UserFunctionHook *UserHookTable;
 
 #define EVT_PURGEUSER  100     /* Deleting a user */
-#define EVT_OUTPUTMSG  101     /* Outputting a message */
+#define EVT_NEWUSER    102     /* Creating a user */
 
 /*
  * MessageFunctionHook extensions are used for hooks which implement handlers
@@ -437,41 +434,6 @@ struct MetaData {
 };
 
 
-
-/* Built-in debuggable stuff for checking for memory leaks */
-#ifdef DEBUG_MEMORY_LEAKS
-
-#define mallok(howbig)         tracked_malloc(howbig, __FILE__, __LINE__)
-#define phree(whichptr)                        tracked_free(whichptr)
-#define reallok(whichptr,howbig)       tracked_realloc(whichptr,howbig)
-#define strdoop(orig)          tracked_strdup(orig, __FILE__, __LINE__)
-
-void *tracked_malloc(size_t, char *, int);
-void tracked_free(void *);
-void *tracked_realloc(void *, size_t);
-void dump_tracked(void);
-char *tracked_strdup(const char *, char *, int);
-
-struct TheHeap {
-       struct TheHeap *next;
-       char h_file[32];
-       int h_line;
-       void *h_ptr;
-};
-
-extern struct TheHeap *heap;
-
-#else
-
-#define mallok(howbig)                 malloc(howbig)
-#define phree(whichptr)                        free(whichptr)
-#define reallok(whichptr,howbig)       realloc(whichptr,howbig)
-#define strdoop(orig)                  strdup(orig)
-
-
-#endif
-
-
 /* 
  * Serialization routines use this struct to return a pointer and a length
  */