From: Wilfried Göesgens Date: Mon, 26 Jan 2009 00:30:22 +0000 (+0000) Subject: * handle new strbufs in wcsession correctly X-Git-Tag: v7.86~1566 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=22a6d40ee22e0bc066c956cc82b1d8a96ea42e20;p=citadel.git * handle new strbufs in wcsession correctly --- diff --git a/webcit/context_loop.c b/webcit/context_loop.c index fd0b0fe04..a11b930d2 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -518,14 +518,11 @@ void context_loop(int *sock) } else TheSession->httpauth_pass = NewStrBufPlain(httpauth_user, -1); + TheSession->CLineBuf = NewStrBuf(); TheSession->hash_prefs = NewHash(1,NULL); /* Get a hash table for the user preferences */ pthread_mutex_init(&TheSession->SessionMutex, NULL); pthread_mutex_lock(&SessionListMutex); - TheSession->urlstrings = NULL; - TheSession->vars = NULL; TheSession->nonce = rand(); - TheSession->WBuf = NULL; - TheSession->CLineBuf = NewStrBuf(); TheSession->next = SessionList; TheSession->is_mobile = -1; SessionList = TheSession; diff --git a/webcit/roomops.c b/webcit/roomops.c index 30cc875e9..677fa66c1 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -496,7 +496,8 @@ void embed_room_banner(char *got, int navbar_style) { * we want it to remember the URL as a "/dotskip" one instead of * a "skip" or "gotonext" or something like that. */ - FreeStrBuf(&WC->this_page); + if (WC->this_page == NULL) + WC->this_page = NewStrBuf(); StrBufPrintf(WC->this_page, "dotskip&room=%s", ChrPtr(WC->wc_roomname));