]> code.citadel.org Git - citadel.git/blobdiff - citadel/context.c
* Changed some instances of 'struct CitContext *CCC = CC;' to 'struct CitContext...
[citadel.git] / citadel / context.c
index 32287e16d3e4fed7bf9f1c1add0ceb109b60ef2c..fb4a5dd11f9a68537204b958c5e7362a7b1aa750 100644 (file)
@@ -345,7 +345,6 @@ void RemoveContext (CitContext *con)
 
        FreeStrBuf(&con->MigrateBuf);
        FreeStrBuf(&con->ReadBuf);
-       FreeStrBuf(&con->lBuf);
        CtdlLogPrintf(CTDL_DEBUG, "Done with RemoveContext()\n");
 }
 
@@ -368,7 +367,6 @@ CitContext *CreateNewContext(void) {
                return NULL;
        }
        memset(me, 0, sizeof(CitContext));
-       me->lBuf = NewStrBufPlain(NULL, SIZ);
        /* Give the contaxt a name. Hopefully makes it easier to track */
        strcpy (me->user.fullname, "SYS_notauth");
        
@@ -435,7 +433,6 @@ void CtdlFillSystemContext(CitContext *context, char *name)
        long len;
 
        memset(context, 0, sizeof(CitContext));
-       context->lBuf = NewStrBuf();
        context->internal_pgm = 1;
        context->cs_pid = 0;
        strcpy (sysname, "SYS_");
@@ -459,6 +456,17 @@ void CtdlFillSystemContext(CitContext *context, char *name)
        }
 }
 
+/*
+ * flush it again...
+ */
+void CtdlClearSystemContext(void)
+{
+       CitContext *CCC = MyContext();
+
+       memset(CCC, 0, sizeof(CitContext));
+       citthread_setspecific(MyConKey, NULL);
+}
+
 /*
  * Cleanup any contexts that are left lying around
  */
@@ -582,7 +590,6 @@ void InitializeMasterCC(void) {
        memset(&masterCC, 0, sizeof( CitContext));
        masterCC.internal_pgm = 1;
        masterCC.cs_pid = 0;
-       masterCC.lBuf = NewStrBuf ();
 }