/* $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
#ifdef __GNUC__
-#define INLINE inline
+#define INLINE __inline__
#else
#define INLINE
#endif
/* 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 */
};
S_DIRECTORY,
S_NETCONFIGS,
S_PUBLIC_CLIENTS,
+ S_LDAP,
+ S_FLOORCACHE,
MAX_SEMAPHORES
};
*/
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
};
-
-/* 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
*/