Clear of non-default language setting moved to its proper place
authorArt Cancro <ajc@uncensored.citadel.org>
Sat, 27 Aug 2011 23:25:57 +0000 (19:25 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 21:58:29 +0000 (21:58 +0000)
webcit/context_loop.c

index 3122ce49448fbf43e2563ec0f79d29a1b32633b0..f3d54c4ce0bfd099f186194a9d1d753143500442 100644 (file)
@@ -612,12 +612,12 @@ void context_loop(ParsedHttpHdrs *Hdr)
         * spider crawls the site without using cookies.
         */
        if ((session_may_be_reused) && (!WC->logged_in)) {
-               WC->wc_session = 0;
+               WC->wc_session = 0;                     /* flag as available for re-use */
+               TheSession->selected_language = 0;      /* clear any non-default language setting */
        }
 
        TheSession->Hdr = NULL;
        TheSession->inuse = 0;                                  /* mark the session as unbound */
-       TheSession->selected_language = 0;                      /* clear any non-default language setting */
        CtdlLogResult(pthread_mutex_unlock(&TheSession->SessionMutex));
 }