X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fcontext_loop.c;h=8d7bb9e6666acef7b190aeaf9267bfe80e27e23e;hb=64a9d779e6d2f3e8b9b8492aea68fbf881d6d71b;hp=3a742a7ee63beef5b14d55f853f75a00c979e00d;hpb=450c8beef81a4e7d23d0afc17c7ae5d1dba4e6ba;p=citadel.git diff --git a/webcit/context_loop.c b/webcit/context_loop.c index 3a742a7ee..8d7bb9e66 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -100,7 +100,6 @@ void do_housekeeping(void) } free_attachments(sessions_to_kill); free_march_list(sessions_to_kill); - clear_substs(sessions_to_kill); DeleteHash(&(sessions_to_kill->hash_prefs)); pthread_mutex_unlock(&sessions_to_kill->SessionMutex); @@ -476,6 +475,8 @@ void context_loop(int sock) 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->next = SessionList; SessionList = TheSession; @@ -493,6 +494,9 @@ void context_loop(int sock) */ pthread_mutex_lock(&TheSession->SessionMutex); /* bind */ pthread_setspecific(MyConKey, (void *)TheSession); + + TheSession->urlstrings = NewHash(1,NULL); + TheSession->vars = NewHash(1,NULL); TheSession->http_sock = sock; TheSession->lastreq = time(NULL); /* log */ TheSession->gzip_ok = gzip_ok; @@ -506,6 +510,9 @@ void context_loop(int sock) #ifdef ENABLE_NLS stop_selected_language(); /* unset locale */ #endif + DeleteHash(&TheSession->urlstrings); + DeleteHash(&TheSession->vars); + pthread_mutex_unlock(&TheSession->SessionMutex); /* unbind */ /* Free the request buffer */ @@ -519,5 +526,6 @@ void context_loop(int sock) * Free up any session-local substitution variables which * were set during this transaction */ - clear_local_substs(); + + }