* Added function CtdlGetDynamicSymbol() for dynamic symbol allocation
[citadel.git] / citadel / citserver.c
index 45e36721a170baa86aba19403a5cf164289f70fc..44a98d021bbf27470c04e1e362a7e5a8ecb3d733 100644 (file)
@@ -152,6 +152,17 @@ void cleanup_stuff(void *arg)
        }
 
 
+/*
+ * Get a dynamic symbol number for per-session user data.
+ * This API call should be made only ONCE per symbol per citserver run.
+ */
+int CtdlGetDynamicSymbol() 
+{
+       static unsigned int next_symbol = SYM_MAX;
+       return ++next_symbol;
+}
+
+
 
 /*
  * Return a pointer to some generic per-session user data.