From 4eb7d604a281f35d6460056e394806fa55e4984c Mon Sep 17 00:00:00 2001 From: psychon Date: Tue, 30 Mar 2010 19:52:17 +0000 Subject: [PATCH] GetSession(): Properly cache the result This function caches its result for not-logged-in users since r1857. With this commit, it also now works properly for logged-in ones. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1862 726aef4b-f618-498e-8847-2d620e286838 --- WebModules.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/WebModules.cpp b/WebModules.cpp index b39d69fe..c288e3b5 100644 --- a/WebModules.cpp +++ b/WebModules.cpp @@ -666,6 +666,7 @@ CSmartPtr CWebSock::GetSession() { if (pSession != NULL) { // Refresh the timeout m_mspSessions.AddItem((*pSession)->GetId(), *pSession); + m_spSession = *pSession; DEBUG("Found existing session from cookie: [" + sCookieSessionId + "] IsLoggedIn(" + CString((*pSession)->IsLoggedIn() ? "true" : "false") + ")"); return *pSession; }