From 22a6d40ee22e0bc066c956cc82b1d8a96ea42e20 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Mon, 26 Jan 2009 00:30:22 +0000 Subject: [PATCH] * handle new strbufs in wcsession correctly --- webcit/context_loop.c | 5 +---- webcit/roomops.c | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) 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)); -- 2.39.2