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
@@ -183,10 +183,7 @@ void ExportThread::DoMessage()
if( message_work.errors > conn_max_errors )
{
message_work.can_remove = true;
Lock();
log << log1 << "Export: too many errors for uploading " << message_work.path << " (skipping)" << logend << logsave;
Unlock();
}
}
}
@@ -206,9 +203,7 @@ bool ExportThread::Fetch(const char * url)
if( !curl )
{
Lock();
log << log1 << "Export: I can't use curl" << logend;
Unlock();
return false;
}
@@ -232,9 +227,7 @@ bool ExportThread::Fetch(const char * url)
if( res != 0 )
{
Lock();
log << log1 << "Export: download failed: " << error_buf << logend << logsave;
Unlock();
return false;
}
@@ -288,9 +281,7 @@ FILE * file = 0;
if( !file )
{
Lock();
log << log1 << "Export: I cannot open the file: " << local_path << logend;
Unlock();
return false;
}
else
@@ -307,9 +298,7 @@ FILE * file = 0;
if( !curl )
{
Lock();
log << log1 << "Export: I can't use curl (sending)" << logend;
Unlock();
if( file )
fclose(file);
@@ -355,16 +344,12 @@ FILE * file = 0;
if( res != 0 )
{
Lock();
log << log1 << "Export: upload failed: " << error_buf << " (" << ftp_server << ")" << logend << logsave;
Unlock();
return false;
}
else
{
Lock();
log << log2 << "Export: uploaded: " << ftp_server << logend << logsave;
Unlock();
}
return true;