]> code.citadel.org Git - citadel.git/blobdiff - citadel/context.c
* add function to cleanly shutdown server threads
[citadel.git] / citadel / context.c
index 32287e16d3e4fed7bf9f1c1add0ceb109b60ef2c..5f964be4a0e443dc378c0593fc5c7e6699eadde5 100644 (file)
@@ -459,6 +459,18 @@ void CtdlFillSystemContext(CitContext *context, char *name)
        }
 }
 
+/*
+ * flush it again...
+ */
+void CtdlClearSystemContext(void)
+{
+       CitContext *CCC = CC;
+
+       FreeStrBuf(&CCC->lBuf);
+       memset(CCC, 0, sizeof(CitContext));
+       citthread_setspecific(MyConKey, NULL);
+}
+
 /*
  * Cleanup any contexts that are left lying around
  */