From 350fc551e5e4fb61420987c418bd5feab3c0a88d Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Mon, 2 Jul 2018 12:02:19 +0000 Subject: [PATCH] fixed: a default winix function was selected before the mount point was calculated also a mount point should be cleared (set to an empty mount point) at the end of a request git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1117 e52654a7-88a9-db11-a3e9-0013d4bc506e --- winixd/core/app.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/winixd/core/app.cpp b/winixd/core/app.cpp index 22fbbc0..9ef69ab 100644 --- a/winixd/core/app.cpp +++ b/winixd/core/app.cpp @@ -408,6 +408,7 @@ void App::ProcessRequestThrow() if( !cur.request->dir_tab.empty() ) { + cur.mount = system.mounts.CalcCurMount(); functions.CheckFunctionAndSymlink(); session_manager.PrepareSession(); @@ -450,6 +451,7 @@ void App::ProcessRequestThrow() { cur.request->dir_tab.push_back(root_dir); cur.request->last_item = cur.request->dir_tab.back(); + cur.mount = system.mounts.CalcCurMount(); } else { @@ -457,8 +459,6 @@ void App::ProcessRequestThrow() } } - cur.mount = system.mounts.CalcCurMount(); - if( cur.mount->type != system.mounts.MountTypeStatic() ) Make(); } @@ -523,6 +523,8 @@ void App::ClearAfterRequest() html_filtered.clear(); aheader_name.clear(); aheader_value.clear(); + cur.mount = system.mounts.GetEmptyMount(); + system.mounts.pmount = cur.mount; // IMPROVE ME system.mounts.pmount will be removed // send_data_buf doesn't have to be cleared and it is better to not clear it (optimizing) log << logendrequest;