mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-23 15:53:10 +08:00
Revert #242 and improve security when sending files to client
This commit is contained in:
@@ -35,3 +35,7 @@ int FileBatchTransferWorker(const std::vector<std::string>& files, const std::st
|
||||
int RecvFileChunk(char* buf, size_t len, void* user, OnFinish f, const std::string& hash, const std::string& hmac);
|
||||
|
||||
uint8_t* ScaleBitmap(uint8_t* dst, const uint8_t* src, int srcW, int srcH, int dstW, int dstH);
|
||||
|
||||
std::vector<std::string> PreprocessFilesSimple(const std::vector<std::string>& inputFiles);
|
||||
|
||||
std::vector<char> BuildMultiStringPath(const std::vector<std::string>& paths);
|
||||
|
||||
@@ -103,9 +103,11 @@ public:
|
||||
writeToFile(logEntry);
|
||||
}
|
||||
}
|
||||
#ifndef _WINDOWS
|
||||
#ifdef _DEBUG
|
||||
#ifndef _WINDOWS
|
||||
printf("%s", logEntry.c_str());
|
||||
#else
|
||||
OutputDebugStringA(logEntry.c_str());
|
||||
#endif
|
||||
#endif
|
||||
cv.notify_one(); // 通知写线程
|
||||
@@ -260,8 +262,6 @@ inline const char* getFileName(const char* path)
|
||||
#define Mprintf(format, ...) Logger::getInstance().log(getFileName(skCrypt(__FILE__)), __LINE__, skCrypt(format), __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
inline void Log(const char* message)
|
||||
{
|
||||
return Logger::getInstance().log(NULL, 0, "%s", message);
|
||||
@@ -276,3 +276,5 @@ inline void Logf(const char* file, int line, const char* format, ...)
|
||||
va_end(args);
|
||||
return Logger::getInstance().log(getFileName(file), line, "%s", message);
|
||||
}
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
Reference in New Issue
Block a user