fixed: permissions to symlinks and directories with redirect flag were incorrectly checked

(there was no session set and the request was treated the same as from a not logged user)
fixed: in BaseThread there was used 'log' in the main thread (this logger is only for the other thread)
added: in BaseThread we have a main_log now - logger which puts to the main log buffer from the main thread




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1182 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2019-03-19 18:08:09 +00:00
parent ae03922491
commit 4c2efc08fd
8 changed files with 106 additions and 104 deletions

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2011-2018, Tomasz Sowa
* Copyright (c) 2011-2019, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -72,27 +72,31 @@ sigset_t set;
void ThreadManager::Add(BaseThread * pbase, const wchar_t * thread_name)
{
ThreadItem item;
thread_tab.emplace_back();
ThreadItem & item = thread_tab.back();
item.thread_item_data = new ThreadItemData();
ThreadItemData & data = *item.thread_item_data;
item.object = pbase;
item.name = thread_name;
item.object->set_dependency(this);
thread_tab.push_back(item);
thread_tab.back().thread_item_data = new ThreadItemData();
thread_tab.back().object->set_dependency(this);
// main log buffer (from the main thread)
item.object->set_main_log_buffer(log.GetLogBuffer());
item.object->set_main_file_log(log.GetFileLog());
// the logger buffer and model_connector are different
ThreadItemData & data = *thread_tab.back().thread_item_data;
thread_tab.back().object->set_log_buffer(&data.log_buffer);
item.object->set_log_buffer(&data.log_buffer);
//data.postgresql_connector.set_logger(logger);
data.postgresql_connector.set_conn_param(config->db_database, config->db_user, config->db_pass);
data.postgresql_connector.set_logger(thread_tab.back().object->get_logger());
data.postgresql_connector.set_logger(item.object->get_logger());
data.postgresql_connector.set_log_queries(config->log_db_query);
data.postgresql_connector.wait_for_connection();
data.model_connector.set_db_connector(data.postgresql_connector);
data.model_connector.set_flat_connector(data.json_connector);
thread_tab.back().object->set_model_connector(&data.model_connector);
item.object->set_model_connector(&data.model_connector);
if( were_started )
{
@@ -144,8 +148,6 @@ void ThreadManager::StartAll()
void ThreadManager::Start(int id, ThreadItem * item)
{
item->object->SetSynchro(synchro);
if( item->object->StartThread() )
{
log << log4 << "TM: thread " << id << " (" << item->object->ThreadId() << ", name: "