Просмотр исходного кода

Z991239-6413 #comment 梳理额外改动点

80374374 2 месяцев назад
Родитель
Сommit
4d0f281f58

+ 1 - 1
.gitignore

@@ -196,7 +196,7 @@ install_manifest.txt
 compile_commands.json
 CTestTestfile.cmake
 _deps
-#CMakeSettings.json
+CMakeSettings.json
 CMakePresets.json
 /Other/libimageproc/RCa15420
 /cpp.hint

+ 0 - 27
Framework/Common/SpBase.h

@@ -934,33 +934,6 @@ struct IEntityFunction
 	/** force shell to dump a log file */
 	virtual ErrorCodeEnum FlushLogFile() = 0;
 
-	/**
-	 * read persist object from framework's serialize directory
-	 * @param pszClass which class the object belongs
-	 * @param pszKey the object key, key is case-sensitive!!!
-	 * note: actually this object stores at dir %syspath%/Objects/<EntityName>/pszClass/pszKey
-	 * so pszClass and pszKey cannot contains chars which os file path specification forbidden, such as *, ?
-	 */
-	virtual ErrorCodeEnum ReadPersistObject(const char* pszClass, const char* pszKey, IEntityPersistObject* pInstance) = 0;
-
-	/** write persist object to framework's serialize directory */
-	virtual ErrorCodeEnum WritePersistObject(const char* pszClass, const char* pszKey, const IEntityPersistObject* pInstance) = 0;
-
-	/** get the number of persist object */
-	virtual ErrorCodeEnum ReadNumOfPersistObject(const char* pClassName, DWORD& dwNum) = 0;
-
-	/** get class all objects keys */
-	virtual ErrorCodeEnum GetPersistClassObjectKeys(const char* pClassName, CAutoArray<CSimpleStringA>& strKeys) = 0;
-
-	/** delete persist object */
-	virtual ErrorCodeEnum DeleteKeyOfPersistObject(const char* pClassName, const char* pszKey) = 0;
-
-	/** walk through class objects of pClassName, Handle=0 find from beginning */
-	virtual ErrorCodeEnum EnumKeyOfPersistObject(const char* pClassName, CSimpleStringA& strKey, DWORD& dwHandle) = 0;
-
-	/** delete all persist object of class pClassName */
-	virtual ErrorCodeEnum CleanAllOfPersistObject(const char* pClassName) = 0;
-
 	/**
 	 * do async connect to remote entity service, after connected, then pClientSession->Onconnected will call
 	 * note: if return succeed, pClientSession will delete by system via OnDestroy

+ 12 - 7
Framework/libtoolkit/charset.c

@@ -822,11 +822,15 @@ TOOLKIT_API char* ConvertGBKToUtf8(const char* gbk, int* n)
 	WideCharToMultiByte(CP_UTF8, 0, wszGBK, -1, szUtf8, len, NULL, NULL);
 
 	free(wszGBK);
-	*n = len - 1;
-	return szUtf8;
 #else
-    return NULL;
+	int len = strlen(gbk);
+	char* szUtf8 = malloc(sizeof(char) * (len + 1));
+	memset(szUtf8, 0, len + 1);
+    strcpy(szUtf8, gbk);
+    len += 1;
 #endif
+    * n = len - 1;
+    return szUtf8;
 }
 
 TOOLKIT_API char* ConvertUtf8ToGBK(const char* strUtf8)
@@ -842,10 +846,11 @@ TOOLKIT_API char* ConvertUtf8ToGBK(const char* strUtf8)
 	memset(szGBK, 0, len + 1);
 	WideCharToMultiByte(CP_ACP, 0, wszGBK, -1, szGBK, len, NULL, NULL);
 	free(wszGBK);
-
-	return szGBK;
 #else
-    return NULL;
+    int len = strlen(strUtf8);
+	char* szGBK = malloc(sizeof(char) * (len + 1));
+	memset(szGBK, 0, len + 1);
+    strcpy(szGBK, strUtf8);
 #endif
-
+    return szGBK;
 }

+ 2 - 2
Framework/libtoolkit/charset.h

@@ -31,12 +31,12 @@ extern "C" {
 	TOOLKIT_API size_t toolkit_wcs2mbs(const wchar_t* src, char* dst, size_t dst_size);
 
     //only valid in win and the user remember to free the return if not null
-    //return NULL input param directory in UOS, please use toolkit_utf82gbk if you need
+    //return malloc(input param) directory in UOS, please use toolkit_utf82gbk if you need
     //copy from httpclient.h
     TOOLKIT_API char* ConvertUtf8ToGBK(const char* strUtf8);
 
 	//only valid in win and the user remember to free the return if not null
-	//return NULL directory in UOS, please use toolkit_gbk2utf8 if you need
+	//return malloc(input param) directory in UOS, please use toolkit_gbk2utf8 if you need
 	//copy from httpclient.h
     TOOLKIT_API char* ConvertGBKToUtf8(const char* gbk, int* n);
 

+ 1 - 0
Framework/libtoolkit/log_periodic.c

@@ -284,6 +284,7 @@ static int periodicfilefactory_record_log(void *self,
 				st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, log_level2str(level));
 			plog->first_record = 0;
 		} else {
+			//TODO: CrossPlaform 这个不太好处理,需要直接修改WINPR中的GetCurrentThreadId原始函数,但这个函数有其他引用  [Gifur@202584]
 #if defined(_MSC_VER)
             n = sprintf(tmp, LINE_BREAK_STR "[%02d:%02d:%02d.%03d][%5u][%s] ",
                         st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, GetCurrentThreadId(), log_level2str(level));

+ 11 - 146
Framework/spbase/SpEntity.cpp

@@ -4,7 +4,6 @@
 #include "SpTimer.h"
 #include "SpMisc.h"
 #include "SpHelper.h"
-#include "SpBinaryPersistStream.h"
 #include "SpEntity.h"
 #include "SpModule.h"
 #include "SpAsyncWait.h"
@@ -34,7 +33,7 @@
 #include "sp_firewallControl.h"
 #else
 #include "sp_dbg_export.h"
-#endif //_WIN32
+#endif //RVC_OS_WIN
 #include "sp_httpDefine.h"
 #include <iostream>
 #include <sstream>
@@ -59,7 +58,7 @@ static void var_callback(sp_var_listener_t *listener,
 	getEntityResource()->m_Entity = pEntity;
 #else
 	GetSpModule()->SetThreadEntity(pEntity);
-#endif //_WIN32
+#endif //RVC_OS_WIN
 
 	sp_env_t *env = sp_get_env();
 	sp_entity_t *ent = sp_mod_mgr_find_entity_by_idx(env->mod_mgr, client_id);
@@ -94,7 +93,7 @@ static void bcm_callback(sp_bcm_listener_t *listener,
 	getEntityResource()->m_Entity = pEntity;
 #else
 	GetSpModule()->SetThreadEntity(pEntity);
-#endif //_WIN32
+#endif //RVC_OS_WIN
 
 	sp_bcm_listener_get_uid(listener, &uid);
 
@@ -188,7 +187,7 @@ static void task_callback(threadpool_t *threadpool, void *arg, param_size_t para
 	GetSpModule()->SetThreadEntity(pEntity);
 	pTask->Process();
 	pTask->DecRef();
-#endif //_WIN32
+#endif //RVC_OS_WIN
 }
 
 static void tpool_log(threadpool_t *threadpool, const char* str)
@@ -237,7 +236,7 @@ SpEntity::~SpEntity()
     if (m_ent != nullptr && m_pEntityBase != nullptr) {
 #ifdef RVC_OS_WIN
         getEntityResource()->m_Entity = NULL;
-#endif //_WIN32
+#endif //RVC_OS_WIN
     }
 }
 
@@ -263,7 +262,7 @@ ErrorCodeEnum SpEntity::Init()
 
 #ifdef RVC_OS_WIN
 	setModuleAliasName(GetEntityBase()->GetEntityName());
-#endif //_WIN32
+#endif //RVC_OS_WIN
 
 	rc = sp_svc_start(m_svc);
 	if (rc != 0) {
@@ -522,7 +521,7 @@ void SpEntity::on_thread_init()
 	getEntityResource()->m_Entity = this;
 #else
 	m_pModule->SetThreadEntity(this);
-#endif //_WIN32
+#endif //RVC_OS_WIN
 }
 
 void SpEntity::on_thread_term()
@@ -532,7 +531,7 @@ void SpEntity::on_thread_term()
 	getEntityResource()->m_Entity = NULL;
 #else
 	m_pModule->SetThreadEntity(NULL);
-#endif //_WIN32
+#endif //RVC_OS_WIN
 }
 
 void SpEntity::__on_thread_init(threadpool_t *, void *arg)
@@ -544,7 +543,7 @@ void SpEntity::__on_thread_init(threadpool_t *, void *arg)
 	 GetCurrentThreadIdFromSys());
 #else
 	 GetCurrentThreadId());
-#endif //NOT _WIN32
+#endif //NOT RVC_OS_WIN
 }
 
 void SpEntity::__on_thread_term(threadpool_t *, void *arg)
@@ -553,11 +552,11 @@ void SpEntity::__on_thread_term(threadpool_t *, void *arg)
 	pThis->on_thread_term();
 
 	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("thread term, thread id:%d", 
-#if defined(_MSC_VER)
+#if defined(RVC_OS_WIN)
 		GetCurrentThreadId());
 #else
 	GetCurrentThreadIdFromSys());
-#endif //_MSC_VER
+#endif //RVC_OS_WIN
 }
 
 ErrorCodeEnum SpEntity::SetTimer(DWORD nTimerID, ITimerListener *pListener, DWORD dwInterval)
@@ -684,140 +683,6 @@ ErrorCodeEnum SpEntity::GetTimerInterval(DWORD nTimerID, DWORD &dwInterval)
 	return Error;
 }
 
-ErrorCodeEnum SpEntity::ReadPersistObject(const char *pszClass, const char *pszKey, IEntityPersistObject *pInstance)
-{
-	sp_env_t *env = sp_get_env();
-	sp_pst_tree_t *tree;
-	int rc;
-
-	if (!pszClass || !pszKey || !pInstance)
-		return Error_Param;
-
-	rc = sp_pst_tree_load(env->dir->obj_path, m_ent->cfg->name, pszClass, pszKey, &tree);
-	if (rc == 0) {
-		sp_pst_elem_t *root = sp_pst_tree_get_root(tree);
-		CSmartPointer<IEntityPersistStreamRead> pStream;
-		pStream.Attach(new SpBinaryPersistStream(SpBinaryPersistStream::Read, root));
-		rc = (int)pInstance->OnRead(pStream);
-		sp_pst_tree_destroy(tree);
-	}
-	
-	return SpTranslateError(rc);
-}
-
-ErrorCodeEnum SpEntity::WritePersistObject(const char *pszClass, const char *pszKey, const IEntityPersistObject *pInstance)
-{
-	sp_env_t *env = sp_get_env();
-	sp_pst_elem_t *root;
-	int rc;
-
-	if (!pszClass || !pszKey || !pInstance)
-		return Error_Param;
-
-	root = sp_pst_elem_create(NULL, pszKey);
-	CSmartPointer<IEntityPersistStreamWrite> pStream;
-	pStream.Attach(new SpBinaryPersistStream(SpBinaryPersistStream::Write, root));
-	rc = (int)pInstance->OnWrite(pStream);
-	if (rc == 0) {
-		sp_pst_tree_t *tree;
-		sp_pst_tree_create(&tree);
-		sp_pst_tree_set_root(tree, root);
-		rc = sp_pst_tree_save(env->dir->obj_path, m_ent->cfg->name, pszClass, pszKey, tree);
-		sp_pst_tree_destroy(tree);
-	} else {
-		sp_pst_elem_destroy(root);
-	}
-
-	return SpTranslateError(rc);
-}
-
-ErrorCodeEnum SpEntity::ReadNumOfPersistObject(const char *pszClassName,DWORD &nNum)
-{
-	if (!pszClassName)
-		return Error_Param;
-	sp_env_t *env = sp_get_env();
-	int cnt;
-	int rc = sp_pst_get_object_count(env->dir->obj_path, m_ent->cfg->name, pszClassName, &cnt);
-	if (rc == 0) 
-		nNum = (DWORD)cnt;
-	return SpTranslateError(rc);
-}
-
-ErrorCodeEnum SpEntity::GetPersistClassObjectKeys(const char *pszClassName, CAutoArray<CSimpleStringA> &strKeys)
-{
-	if (!pszClassName)
-		return Error_Param;
-	sp_env_t *env = sp_get_env();
-	array_header_t *arr = sp_pst_get_object_keys(env->dir->obj_path, m_ent->cfg->name, pszClassName);
-	if (arr) {
-		strKeys.Init(arr->nelts);
-		for (int i = 0; i < arr->nelts; ++i)
-			strKeys[i] = ARRAY_IDX(arr, i, char*);
-		array_free2(arr);
-	} else {
-		strKeys.Init(0);
-	}
-	return Error_Succeed;
-}
-
-ErrorCodeEnum SpEntity::DeleteKeyOfPersistObject(const char *pszClassName,const char *pszKey)
-{
-	if (!pszClassName || !pszKey)
-		return Error_Param;
-	sp_env_t *env = sp_get_env();
-	int rc = sp_pst_delete_object(env->dir->obj_path, m_ent->cfg->name, pszClassName, pszKey);
-	return SpTranslateError(rc);
-}
-
-ErrorCodeEnum SpEntity::EnumKeyOfPersistObject(const char *pszClass,CSimpleStringA &strKey,DWORD &handle)
-{
-	if (!pszClass)
-		return Error_Param;
-	int rc = 0;
-	sp_env_t *env = sp_get_env();
-	struct HelperIterator {
-		array_header_t *arr;
-		int Current;
-	} * pIterator = NULL;
-	if (handle == 0) {
-		pIterator = new HelperIterator();
-		pIterator->arr = sp_pst_get_object_keys(env->dir->obj_path, m_ent->cfg->name, pszClass);
-		if (!pIterator->arr) {
-			delete pIterator;
-			return Error_NotExist;
-		}
-		pIterator->Current = 0;
-#if defined(_MSC_VER)
-		handle = (DWORD)pIterator;
-#else
-		//TODO: x64 environment, depend on how to use the out-param
-		handle = (uintptr_t)(static_cast<void*>(pIterator));
-#endif //_MSC_VER
-	} else {
-		pIterator = (HelperIterator *)handle;
-	}
-	if (pIterator->Current < pIterator->arr->nelts) {
-		strKey = ARRAY_IDX(pIterator->arr, pIterator->Current, char*);
-		pIterator->Current++;
-	} else {
-		if (pIterator->arr)
-			array_free2(pIterator->arr);
-		delete pIterator;
-		handle = 0; // zero handle
-		rc = Error_NotExist;// the end
-	}
-	return SpTranslateError(rc);
-}
-
-ErrorCodeEnum SpEntity::CleanAllOfPersistObject(const char *pszClass)
-{
-	if (!pszClass)
-		return Error_Param;
-	sp_env_t *env = sp_get_env();
-	int rc = sp_pst_delete_class_objects(env->dir->obj_path, m_ent->cfg->name, pszClass);
-	return SpTranslateError(rc);
-}
-
 ErrorCodeEnum SpEntity::SubscribeLog(CUUID &SubscribeID, ILogListener *pListener,LogTypeEnum eLogType,
 					                  SeverityLevelEnum eLevel, ErrorCodeEnum eSysError,DWORD dwUserCode,
 					                  const char *pszEntityName,bool bIgnoreMessage)

+ 0 - 9
Framework/spbase/SpEntity.h

@@ -64,15 +64,6 @@ public:
 	virtual ErrorCodeEnum ResetTimer(DWORD dwTimerID, DWORD dwInterval);
 	virtual ErrorCodeEnum GetTimerInterval(DWORD dwTimerID, DWORD &dwInterval);
 
-	// persist
-	virtual ErrorCodeEnum ReadPersistObject(const char *pszClass, const char *pszKey, IEntityPersistObject *pInstance);
-	virtual ErrorCodeEnum WritePersistObject(const char *pszClass, const char *pszKey, const IEntityPersistObject *pInstance);
-	virtual ErrorCodeEnum ReadNumOfPersistObject(const char *pClassName,DWORD &nNum);
-	virtual ErrorCodeEnum GetPersistClassObjectKeys(const char *pClassName, CAutoArray<CSimpleStringA> &Keys);
-	virtual ErrorCodeEnum DeleteKeyOfPersistObject(const char *pClassName,const char *pszKey);
-	virtual ErrorCodeEnum EnumKeyOfPersistObject(const char *pClassName,CSimpleStringA &strKey,DWORD &Handle);
-	virtual ErrorCodeEnum CleanAllOfPersistObject(const char *pClassName);
-
 	// log
 	virtual ErrorCodeEnum SubscribeLog(CUUID &SubscribeID, ILogListener *pListener,LogTypeEnum eLogType=Log_Ignore,SeverityLevelEnum eLevel=Severity_None, 
 		ErrorCodeEnum eSysError=Error_IgnoreAll,DWORD dwUserCode=0,const char *pszEntityName=NULL,bool bIgnoreMessage=true);

+ 2 - 2
Framework/spbase/spShareMemoryBase.cpp

@@ -501,11 +501,11 @@ void CMyLogFile::PrintCurTime()
 	GetLocalTime(&cur);
     sprintf(dateString, "[%4d-%.2d-%.2d,%.2d:%.2d:%.2d][%u][%u]  ", cur.wYear, cur.wMonth,
             cur.wDay, cur.wHour, cur.wMinute, cur.wSecond, GetCurrentProcessId(), 
-#if defined(_MSC_VER)
+#if defined(RVC_OS_WIN)
 		GetCurrentThreadId());
 #else
 	 GetCurrentThreadIdFromSys());
-#endif //_MSC_VER
+#endif //RVC_OS_WIN
 	Output(dateString);
 }
 

+ 1 - 0
Framework/spbase/sp_cfg.cpp

@@ -748,6 +748,7 @@ int sp_tryRefreshLogLevelFromCacheConfig()
 	return 0;
 }
 
+//TODO: 建议废弃采用上面的综合函数  sp_tryReadFromCacheConfig  [Gifur@202584]
 int sp_tryReadFromCenterSetting(const char* section, const char* key, char *dst, int max_len)
 {
 	char tmp[MAX_PATH];

+ 1 - 1
Framework/spbase/sp_pst.h

@@ -2,7 +2,7 @@
 #define SP_PST_H
 
 #pragma once
-
+//TODO: CrossPlaform ÎļþÒÆ³ý£¬Ã»ÓÐʹÓà  [Gifur@202584]
 #ifdef __cplusplus
 extern "C" {
 #endif

+ 1 - 1
Framework/spshell/spshell.cpp

@@ -374,7 +374,7 @@ const char *GetMachineType()
 
 #ifdef RVC_OS_WIN
 
-//TODO: CrossPlaform  [Gifur@2025730]
+//TODO: CrossPlaform 11111  [Gifur@2025730]
 const char *GetCenterSettingNameBySite(const char *pszSite)
 {
 	///*TODO(80374374@3/23/2023): CenterSettings */

+ 53 - 54
Framework/winpr/include/winpr/error.h

@@ -35,60 +35,59 @@
 #define NO_ERROR 0
 #endif
 
-#define E_UNEXPECTED -2147418113l   // 0x8000FFFFL
-#define E_ACCESSDENIED -2147024891l // 0x80070005L
-#define E_HANDLE -2147024890l       // 0x80070006L
-#define E_OUTOFMEMORY -2147024882l  // 0x8007000EL
-
-#define E_INVALIDARG -2147024809l  // 0x80070057L
-#define E_NOTIMPL -2147467263l     // 0x80004001L
-#define E_NOINTERFACE -2147467262l // 0x80004002L
-#define E_POINTER -2147467261l     // 0x80004003L
-#define E_ABORT -2147467260l       // 0x80004004L
-#define E_FAIL -2147467259l        // 0x80004005L
-
-#define CO_E_INIT_TLS -2147467258l                                 // 0x80004006l
-#define CO_E_INIT_SHARED_ALLOCATOR -2147467257l                    // 0x80004007l
-#define CO_E_INIT_MEMORY_ALLOCATOR -2147467256l                    // 0x80004008l
-#define CO_E_INIT_CLASS_CACHE -2147467255l                         // 0x80004009l
-#define CO_E_INIT_RPC_CHANNEL -2147467254l                         // 0x8000400Al
-#define CO_E_INIT_TLS_SET_CHANNEL_CONTROL -2147467253l             // 0x8000400Bl
-#define CO_E_INIT_TLS_CHANNEL_CONTROL -2147467252l                 // 0x8000400Cl
-#define CO_E_INIT_UNACCEPTED_USER_ALLOCATOR -2147467251l           // 0x8000400Dl
-#define CO_E_INIT_SCM_MUTEX_EXISTS -2147467250l                    // 0x8000400El
-#define CO_E_INIT_SCM_FILE_MAPPING_EXISTS -2147467249l             // 0x8000400Fl
-#define CO_E_INIT_SCM_MAP_VIEW_OF_FILE -2147467248l                // 0x80004010l
-#define CO_E_INIT_SCM_EXEC_FAILURE -2147467247l                    // 0x80004011l
-#define CO_E_INIT_ONLY_SINGLE_THREADED -2147467246l                // 0x80004012l
-#define CO_E_CANT_REMOTE -2147467245l                              // 0x80004013l
-#define CO_E_BAD_SERVER_NAME -2147467244l                          // 0x80004014l
-#define CO_E_WRONG_SERVER_IDENTITY -2147467243l                    // 0x80004015l
-#define CO_E_OLE1DDE_DISABLED -2147467242l                         // 0x80004016l
-#define CO_E_RUNAS_SYNTAX -2147467241l                             // 0x80004017l
-#define CO_E_CREATEPROCESS_FAILURE -2147467240l                    // 0x80004018l
-#define CO_E_RUNAS_CREATEPROCESS_FAILURE -2147467239l              // 0x80004019l
-#define CO_E_RUNAS_LOGON_FAILURE -2147467238l                      // 0x8000401Al
-#define CO_E_LAUNCH_PERMSSION_DENIED -2147467237l                  // 0x8000401Bl
-#define CO_E_START_SERVICE_FAILURE -2147467236l                    // 0x8000401Cl
-#define CO_E_REMOTE_COMMUNICATION_FAILURE -2147467235l             // 0x8000401Dl
-#define CO_E_SERVER_START_TIMEOUT -2147467234l                     // 0x8000401El
-#define CO_E_CLSREG_INCONSISTENT -2147467233l                      // 0x8000401Fl
-#define CO_E_IIDREG_INCONSISTENT -2147467232l                      // 0x80004020l
-#define CO_E_NOT_SUPPORTED -2147467231l                            // 0x80004021l
-#define CO_E_RELOAD_DLL -2147467230l                               // 0x80004022l
-#define CO_E_MSI_ERROR -2147467229l                                // 0x80004023l
-#define CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT -2147467228l // 0x80004024l
-#define CO_E_SERVER_PAUSED -2147467227l                            // 0x80004025l
-#define CO_E_SERVER_NOT_PAUSED -2147467226l                        // 0x80004026l
-#define CO_E_CLASS_DISABLED -2147467225l                           // 0x80004027l
-#define CO_E_CLRNOTAVAILABLE -2147467224l                          // 0x80004028l
-#define CO_E_ASYNC_WORK_REJECTED -2147467223l                      // 0x80004029l
-#define CO_E_SERVER_INIT_TIMEOUT -2147467222l                      // 0x8000402Al
-#define CO_E_NO_SECCTX_IN_ACTIVATE -2147467221l                    // 0x8000402Bl
-#define CO_E_TRACKER_CONFIG -2147467216l                           // 0x80004030l
-#define CO_E_THREADPOOL_CONFIG -2147467215l                        // 0x80004031l
-#define CO_E_SXS_CONFIG -2147467214l                               // 0x80004032l
-#define CO_E_MALFORMED_SPN -2147467213l                            // 0x80004033l
+#define E_UNEXPECTED (HRESULT)0x8000FFFFL
+#define E_NOTIMPL (HRESULT)0x80004001L
+#define E_OUTOFMEMORY (HRESULT)0x8007000EL
+#define E_INVALIDARG (HRESULT)0x80070057L
+#define E_NOINTERFACE (HRESULT)0x80004002L
+#define E_POINTER (HRESULT)0x80004003L
+#define E_HANDLE (HRESULT)0x80070006L
+#define E_ABORT (HRESULT)0x80004004L
+#define E_FAIL (HRESULT)0x80004005L
+#define E_ACCESSDENIED (HRESULT)0x80070005L
+
+#define CO_E_INIT_TLS 0x80004006
+#define CO_E_INIT_SHARED_ALLOCATOR 0x80004007
+#define CO_E_INIT_MEMORY_ALLOCATOR 0x80004008
+#define CO_E_INIT_CLASS_CACHE 0x80004009
+#define CO_E_INIT_RPC_CHANNEL 0x8000400A
+#define CO_E_INIT_TLS_SET_CHANNEL_CONTROL 0x8000400B
+#define CO_E_INIT_TLS_CHANNEL_CONTROL 0x8000400C
+#define CO_E_INIT_UNACCEPTED_USER_ALLOCATOR 0x8000400D
+#define CO_E_INIT_SCM_MUTEX_EXISTS 0x8000400E
+#define CO_E_INIT_SCM_FILE_MAPPING_EXISTS 0x8000400F
+#define CO_E_INIT_SCM_MAP_VIEW_OF_FILE 0x80004010
+#define CO_E_INIT_SCM_EXEC_FAILURE 0x80004011
+#define CO_E_INIT_ONLY_SINGLE_THREADED 0x80004012
+#define CO_E_CANT_REMOTE 0x80004013
+#define CO_E_BAD_SERVER_NAME 0x80004014
+#define CO_E_WRONG_SERVER_IDENTITY 0x80004015
+#define CO_E_OLE1DDE_DISABLED 0x80004016
+#define CO_E_RUNAS_SYNTAX 0x80004017
+#define CO_E_CREATEPROCESS_FAILURE 0x80004018
+#define CO_E_RUNAS_CREATEPROCESS_FAILURE 0x80004019
+#define CO_E_RUNAS_LOGON_FAILURE 0x8000401A
+#define CO_E_LAUNCH_PERMSSION_DENIED 0x8000401B
+#define CO_E_START_SERVICE_FAILURE 0x8000401C
+#define CO_E_REMOTE_COMMUNICATION_FAILURE 0x8000401D
+#define CO_E_SERVER_START_TIMEOUT 0x8000401E
+#define CO_E_CLSREG_INCONSISTENT 0x8000401F
+#define CO_E_IIDREG_INCONSISTENT 0x80004020
+#define CO_E_NOT_SUPPORTED 0x80004021
+#define CO_E_RELOAD_DLL 0x80004022
+#define CO_E_MSI_ERROR 0x80004023
+#define CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT 0x80004024
+#define CO_E_SERVER_PAUSED 0x80004025
+#define CO_E_SERVER_NOT_PAUSED 0x80004026
+#define CO_E_CLASS_DISABLED 0x80004027
+#define CO_E_CLRNOTAVAILABLE 0x80004028
+#define CO_E_ASYNC_WORK_REJECTED 0x80004029
+#define CO_E_SERVER_INIT_TIMEOUT 0x8000402A
+#define CO_E_NO_SECCTX_IN_ACTIVATE 0x8000402B
+#define CO_E_TRACKER_CONFIG 0x80004030
+#define CO_E_THREADPOOL_CONFIG 0x80004031
+#define CO_E_SXS_CONFIG 0x80004032
+#define CO_E_MALFORMED_SPN 0x80004033
 
 #define FACILITY_WINDOWSUPDATE 36
 #define FACILITY_WINDOWS_CE 24

+ 0 - 35
Module/include/CommEntityUtil.hpp

@@ -529,18 +529,6 @@ static void ConvertGBK2Utf8(std::string& str)
 	if (dst) free(dst);
 }
 
-#else
-
-static void ConvertUtf82GBK(std::string& str)
-{
-	std::string notrans(str);
-}
-
-static void ConvertGBK2Utf8(std::string& str)
-{
-	std::string notrans(str);
-}
-
 #endif //_MSC_VER
 
 enum DataTypeToMask
@@ -883,29 +871,6 @@ static ErrorCodeEnum GetINETMacAddresses(CAutoArray<NetworkAdapterItem>& netList
 
 }//Net
 
-namespace FileSystem {
-
-	static DWORD FetchFileSize(const char* filePath)
-	{
-		int fileSize = 0;
-#ifdef RVC_OS_LINUX
-		struct stat statbuf;
-		ZeroMemory(&statbuf, sizeof(statbuf));
-		stat(filePath, &statbuf);
-		fileSize = statbuf.st_size;
-#else
-		
-		HANDLE hFile;
-		hFile = CreateFile(filePath, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-		if (hFile != INVALID_HANDLE_VALUE) {
-			fileSize = GetFileSize(hFile, NULL);
-			CloseHandle(hFile);
-		}
-#endif //RVC_OS_LINUX
-		return fileSize;
-	}
-}
-
 } // mod
 } // sp
 

+ 0 - 298
Module/mod_ResourceWatcher/FileInfo.h

@@ -204,54 +204,6 @@ static void PrintDiskStatus(LPCTSTR dir, const unsigned long long& uiDiskFreeSiz
     DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[Disk(%s)] total: %s, free: %s, rate: %.1lf%%.", dir, szResult2, szResult, dFreeRate * 100);
 }
 
-struct TmpFileInfo
-{
-#if defined(_MSC_VER)
-    string msFileName;
-    FILETIME mftEditTime;
-
-    DWORD mDwFileSizeHeight;
-    DWORD mDwFileSizeLow;
-
-    TmpFileInfo(LPCTSTR lpszFileName, const PFILETIME ftEditTime, DWORD dwFileSizeHeight, DWORD dwFileSizeLow)
-        : msFileName(lpszFileName)
-        , mftEditTime(*ftEditTime)
-        , mDwFileSizeHeight(dwFileSizeHeight)
-        , mDwFileSizeLow(dwFileSizeLow)
-    {
-    }
-#else
-    string msFileName;
-    time_t mftEditTime;
-	off_t ftSize;
-
-    TmpFileInfo() :msFileName(""), mftEditTime(0), ftSize(0){}
-
-    TmpFileInfo(LPCTSTR lpszFileName, const time_t ftEditTime, off_t fileSize)
-        : msFileName(lpszFileName)
-        , mftEditTime(ftEditTime)
-        , ftSize(fileSize)
-    {
-    }
-    ~TmpFileInfo() {}
-
-#endif //_MSC_VER
-};
-
-struct Comparetor 
-{
-	bool operator () (const TmpFileInfo* lhs, const TmpFileInfo* rhs) const 
-	{
-#if defined(_MSC_VER)
-        if (CompareFileTime(&(lhs->mftEditTime), &(rhs->mftEditTime)) > 0)
-            return true;
-        return false;
-#else
-		return (lhs->mftEditTime > rhs->mftEditTime);
-#endif //_MSC_VER
-	}
-};
-
 struct DiskInfo
 {
 #if defined(_MSC_VER)
@@ -364,134 +316,6 @@ struct DiskInfo
         mUiMaxFileSize = uiRhs;
     }
 
-    BOOL CalAverRequreSpaceEachDay(
-        const ULARGE_INTEGER& uiAllVideoFileBytes,
-        const UINT uVideoFileCount,
-        const UINT uAvailDayCount,
-        const UINT uRequredDays,
-        ULARGE_INTEGER& uiRequireBytes)
-    {
-        mUiAllVideoFilesBytes = uiAllVideoFileBytes;
-        mUVideoFileCount = uVideoFileCount;
-        mUVideoCreateDayCount = uAvailDayCount;
-
-        char szResult[DEFAULT_OUTPUT_FORMAT_SIZE];
-        ByteSprintf(szResult, (double)mUiAllVideoFilesBytes.QuadPart);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("录像文件夹的大小 : %s", szResult);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("已上传录像文件数量 : %u", mUVideoFileCount);
-
-        //平均每天的录像数目
-        mUAverageFileCreated = DEFAULT_VIDEOFILE_CREATE_COUNT;
-        if (mUVideoCreateDayCount != 0) {
-            mUAverageFileCreated = mUVideoFileCount / mUVideoCreateDayCount;
-        }
-
-        //平均录像文件的大小 TODO: 
-        mUliAverageFileSize = mUiAllVideoFilesBytes;
-        if (mUVideoFileCount != 0) {
-            mUliAverageFileSize.QuadPart = mUiAllVideoFilesBytes.QuadPart / mUVideoFileCount;
-        }
-
-        ByteSprintf(szResult, (double)mUliAverageFileSize.QuadPart);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("平均录像文件的大小 : %s", szResult);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("平均每天录像的数目 : %u", mUAverageFileCreated);
-
-        //预估每天需要提供的空间大小
-        ULARGE_INTEGER uiForecastDailySpace;
-        uiForecastDailySpace.QuadPart = mUliAverageFileSize.QuadPart * mUAverageFileCreated;
-
-        //至少需预留的磁盘空间大小
-        ULARGE_INTEGER uiForecastSpaceAvail;
-        uiForecastSpaceAvail.QuadPart = uiForecastDailySpace.QuadPart * uRequredDays;
-        ByteSprintf(szResult, (double)uiForecastSpaceAvail.QuadPart);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("需预留的磁盘空间大小 : %s", szResult);
-
-        mUiFreeBytesRequired = uiForecastSpaceAvail;
-        uiRequireBytes = uiForecastSpaceAvail;
-
-        return (mBAverageAvailable = TRUE);
-    }
-
-    BOOL IsNeedToDoClearJobEx(LPCTSTR lpszDiskPath,
-                              const ULARGE_INTEGER& uiRequiredByts,
-                              const ULARGE_INTEGER& uiAdjustmentFactor, PULARGE_INTEGER pUiRealRequiredByts)
-    {
-        BOOL bRet = FALSE;
-        if (lpszDiskPath == NULL || strlen(lpszDiskPath) == 0)
-            return FALSE;
-        if (pUiRealRequiredByts != NULL) {
-            pUiRealRequiredByts->QuadPart = 0;
-        }
-        ULARGE_INTEGER uiDiskOverallSize;
-        ULARGE_INTEGER uiDiskFreeSize;
-        bRet = GetDiskSpace(lpszDiskPath, uiDiskOverallSize, uiDiskFreeSize);
-        if (bRet) {
-            assert(uiDiskOverallSize.QuadPart != 0);
-            char szResult[DEFAULT_OUTPUT_FORMAT_SIZE];
-            char szResult2[DEFAULT_OUTPUT_FORMAT_SIZE];
-            ByteSprintf(szResult, (double)uiDiskFreeSize.QuadPart);
-            ByteSprintf(szResult2, (double)uiDiskOverallSize.QuadPart);
-            //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Current operated disk(%s) : %s / %s", lpszDiskPath, szResult, szResult2);
-            ULARGE_INTEGER uiForecastSpaceAvail;
-            uiForecastSpaceAvail.QuadPart = uiRequiredByts.QuadPart + uiAdjustmentFactor.QuadPart;
-            if (uiForecastSpaceAvail.QuadPart > uiDiskFreeSize.QuadPart) {
-                ULARGE_INTEGER uiTemp;
-                uiTemp.QuadPart = uiForecastSpaceAvail.QuadPart - uiDiskFreeSize.QuadPart;
-                ByteSprintf(szResult, (double)uiTemp.QuadPart);
-                DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("More space required : %s", szResult);
-                if (pUiRealRequiredByts != NULL) {
-                    pUiRealRequiredByts->QuadPart = uiTemp.QuadPart;
-                }
-            }
-        }
-        return bRet;
-    }
-
-    BOOL IsNeedToDoClearJob(const ULARGE_INTEGER& uiAdjustmentFactor, PULARGE_INTEGER pUiRealRequiredByts)
-    {
-        BOOL bResult = FALSE;
-
-        char szResult[DEFAULT_OUTPUT_FORMAT_SIZE];
-        //ByteSprintf(szResult, ULONGLONG_ERROR);
-        if (mUiUploadVideoFileBytes.QuadPart != ULONGLONG_ERROR) {
-            ByteSprintf(szResult, (double)mUiUploadVideoFileBytes.QuadPart);
-            DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("未上传录像文件夹的大小 : %s", szResult);
-        }
-
-#if JUS_A_TEST
-        //uiAdjustmentFactor.QuadPart = 1024ui64 * 1024 * 1024 * 100 * 4;
-#endif
-        if (pUiRealRequiredByts != NULL) {
-            pUiRealRequiredByts->QuadPart = 0;
-        }
-
-        ULARGE_INTEGER uiForecastSpaceAvail;
-
-        if (!mBAverageAvailable) {
-            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("mBAverageAvailable == FALSE");
-            return FALSE;
-        }
-
-        uiForecastSpaceAvail.QuadPart = mUiFreeBytesRequired.QuadPart + uiAdjustmentFactor.QuadPart;
-
-        assert(mUliDiskOverallSize.QuadPart != 0);
-
-        if (uiForecastSpaceAvail.QuadPart > mUliDiskFreeSize.QuadPart) {
-            //TODO: Alert !!
-            ULARGE_INTEGER uiTemp;
-            uiTemp.QuadPart = uiForecastSpaceAvail.QuadPart - mUliDiskFreeSize.QuadPart;
-            ByteSprintf(szResult, (double)uiTemp.QuadPart);
-            DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("需要待清理的空间大小 : %s", szResult);
-            if (pUiRealRequiredByts != NULL) {
-                pUiRealRequiredByts->QuadPart = uiTemp.QuadPart;
-            }
-            bResult = TRUE;
-        } else {
-            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("当前无需对磁盘空间进行清理。");
-        }
-        return bResult;
-    }
-
     static BOOL GetDiskSpace(
         LPCTSTR lpszVideoPath,
         ULARGE_INTEGER& uiTotalByteNumber,
@@ -530,128 +354,6 @@ struct DiskInfo
         mUiMaxFileSize = uiRhs;
     }
 
-    BOOL CalAverRequreSpaceEachDay(
-        const unsigned long long& uiAllVideoFileBytes,
-        const unsigned int uVideoFileCount,
-        const unsigned int uAvailDayCount,
-        const unsigned int uRequredDays,
-        unsigned long long& uiRequireBytes)
-    {
-        mUiAllVideoFilesBytes = uiAllVideoFileBytes;
-        mUVideoFileCount = uVideoFileCount;
-        mUVideoCreateDayCount = uAvailDayCount;
-
-        char szResult[DEFAULT_OUTPUT_FORMAT_SIZE];
-        ByteSprintf(szResult, (double)mUiAllVideoFilesBytes);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("录像文件夹的大小 : %s", szResult);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("录像文件数量(已上传+未上传) : %u", mUVideoFileCount);
-
-        //平均每天的录像数目
-        mUAverageFileCreated = DEFAULT_VIDEOFILE_CREATE_COUNT;
-        if (mUVideoCreateDayCount != 0) {
-            mUAverageFileCreated = mUVideoFileCount / mUVideoCreateDayCount;
-        }
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("平均每天录像的数目 : %u", mUAverageFileCreated);
-
-        //平均录像文件的大小 TODO: 
-        if (mUVideoFileCount != 0) {
-            mUliAverageFileSize = mUiAllVideoFilesBytes / mUVideoFileCount;
-        } else {
-            mUliAverageFileSize = mUiAllVideoFilesBytes;
-        }
-        ByteSprintf(szResult, (double)mUliAverageFileSize);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("平均录像文件的大小 : %s", szResult);
-        
-        //预估每天需要提供的空间大小 = 平均每个文件大小 * 平均每天文件数量
-        const unsigned long long uiForecastDailySpace = mUliAverageFileSize * mUAverageFileCreated;
-
-        //至少需预留的磁盘空间大小 = 平均每天需要的大小*要求留存的天数
-        const unsigned long long uiForecastSpaceAvail = uiForecastDailySpace * uRequredDays;
-        ByteSprintf(szResult, (double)uiForecastSpaceAvail);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("需预留的磁盘空间大小(平均每个文件大小 * 平均每天文件数量 * 要求留存的天数#%u) : %s", uRequredDays, szResult);
-        mUiFreeBytesRequired = uiForecastSpaceAvail;
-
-        uiRequireBytes = uiForecastSpaceAvail;
-        return (mBAverageAvailable = TRUE);
-    }
-
-    /**
-    uiAdjustmentFactor: 增量调整因子
-    */
-    BOOL IsNeedToDoClearJobEx(LPCTSTR lpszDiskPath,
-                              const unsigned long long& uiRequiredByts,
-                              const unsigned long long& uiAdjustmentFactor, 
-                              unsigned long long* pUiRealRequiredByts)
-    {
-        BOOL bRet = FALSE;
-        if (lpszDiskPath == NULL || strlen(lpszDiskPath) == 0)
-            return FALSE;
-        if (pUiRealRequiredByts != NULL) {
-            *pUiRealRequiredByts = 0;
-        }
-        unsigned long long uiDiskOverallSize;
-        unsigned long long uiDiskFreeSize;
-        bRet = GetDiskSpace(lpszDiskPath, uiDiskOverallSize, uiDiskFreeSize);
-        if (bRet) {
-            assert(uiDiskOverallSize != 0);
-            PrintDiskStatus(lpszDiskPath, uiDiskFreeSize, uiDiskOverallSize);
-            const unsigned long long uiForecastSpaceAvail = uiRequiredByts + uiAdjustmentFactor;
-            if (uiForecastSpaceAvail > uiDiskFreeSize) {
-                unsigned long long uiTemp;
-                uiTemp = uiForecastSpaceAvail - uiDiskFreeSize;
-                char szResult[DEFAULT_OUTPUT_FORMAT_SIZE];
-                ByteSprintf(szResult, (double)uiTemp);
-                DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("More space required : %s", szResult);
-                if (pUiRealRequiredByts != NULL) {
-                    *pUiRealRequiredByts = uiTemp;
-                }
-                return TRUE;
-            }
-        }
-        return FALSE;
-    }
-
-    BOOL IsNeedToDoClearJob(const unsigned long long& uiAdjustmentFactor, unsigned long long* pUiRealRequiredByts)
-    {
-        BOOL bResult = FALSE;
-
-        char szResult[DEFAULT_OUTPUT_FORMAT_SIZE];
-        if (mUiUploadVideoFileBytes != ULONGLONG_ERROR) {
-            ByteSprintf(szResult, (double)mUiUploadVideoFileBytes);
-            DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("未上传录像文件夹的大小 : %s", szResult);
-        }
-
-        if (pUiRealRequiredByts != NULL) {
-            *pUiRealRequiredByts = 0;
-        }
-
-        unsigned long long uiForecastSpaceAvail;
-
-        if (!mBAverageAvailable) {
-            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("mBAverageAvailable == FALSE");
-            return FALSE;
-        }
-
-        uiForecastSpaceAvail = mUiFreeBytesRequired + uiAdjustmentFactor;
-
-        assert(mUliDiskOverallSize != 0);
-
-        if (uiForecastSpaceAvail > mUliDiskFreeSize) {
-            //TODO: Alert !!
-            unsigned long long uiTemp;
-            uiTemp = uiForecastSpaceAvail - mUliDiskFreeSize;
-            ByteSprintf(szResult, (double)uiTemp);
-            DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("需要待清理的空间大小 : %s", szResult);
-            if (pUiRealRequiredByts != NULL) {
-                *pUiRealRequiredByts = uiTemp;
-            }
-            bResult = TRUE;
-        } else {
-            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("当前无需对磁盘空间进行清理。");
-        }
-        return bResult;
-    }
-
 	static BOOL GetDiskSpace(LPCTSTR lpszVideoPath,unsigned long long& uiTotalByteNumber, unsigned long long& uiTotalFreeByteNumber)
 	{
         struct statfs buf;

+ 2 - 4
Module/mod_ResourceWatcher/mod_ResourceWatcher.h

@@ -13,11 +13,9 @@ class ResourceWatcherEntity;
 
 #define ENCODING (X509_ASN_ENCODING | PKCS_7_ASN_ENCODING)
 #if defined(RVC_OS_WIN)
-#define SECNAME_PROCESSDETECT "ProcDetectFlag"
+	#define SECNAME_PROCESSDETECT "ProcDetectFlag"
 #else
-#define SECNAME_PROCESSDETECT "ProcDetectFlag4UOS"
-
-	
+	#define SECNAME_PROCESSDETECT "ProcDetectFlag4UOS"
 #endif //RVC_OS_WIN
 
 const int AbsolutePath = 0;

+ 1 - 1
Module/mod_UpgradeMgr/UpgradeTaskFSM.cpp

@@ -2232,7 +2232,7 @@ int CUpgradeTaskFSM::ExecRunCmd(CSimpleStringA &strErrMsg,CInstallStep* ins)
 		}else{
 			//进一步看返回结果文件判断是否成功
 			CSimpleStringA strUnzipPath = GetFileDirectory(destPath.GetData());
-			//TODO: CrossPlaform  [Gifur@2025730]
+			//TODO: CrossPlaform  1111 [Gifur@2025730]
 #ifdef RVC_OS_WIN
 			CSimpleStringA strResultLog = strUnzipPath + "\\result.log";//结果文件
 #else

+ 1 - 0
Module/mod_accessauth/AccessAuthFSM.cpp

@@ -830,6 +830,7 @@ DWORD CAccessAuthFSM::GetEncTerminalInfoWithKey(CBlob& encInfo, BYTE* key)
 
 	char* pBuf = new char[2048];
 	int len = 0;
+	//TODO: CrossPlaform
 #ifdef RVC_OS_WIN
 	string tmpStr = strResult.second;
 	SP::Module::Util::ConvertGBK2Utf8(tmpStr);

+ 2 - 2
Module/mod_accessauth/mod_AccessAuth.h

@@ -11,9 +11,9 @@ using namespace AccessAuthorization;
 #define DEFALT_WAIT_PINPAD_MS 0
 #define INTERVAL_WAIT_PINPAD_MS 200
 
-//TODO: rm  [Gifur@2025725]
+//TODO: CrossPlaform  [Gifur@2025725]
 int HexBuf2StrBuf(PBYTE hexBuf, char** strBuf, DWORD len);
-//TODO: rm  [Gifur@2025725]
+//TODO: CrossPlaform  [Gifur@2025725]
 int StrBuf2HexBuf(LPCTSTR strBuf, PBYTE* hexBuf);
 
 class CAccessAuthEntity;

+ 3 - 12
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -906,12 +906,7 @@ bool CHealthManagerEntity::SaveCurrentVersion()
 		DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM)("get runinfo path failed(%s)", SpStrError(eErr));
 		return false;
 	}
-	//TODO: CrossPlaform  [Gifur@2025730]
-#if defined(RVC_OS_WIN)
-	csBakFile = csRunInfo + "\\runcfg\\version.dat";
-#else
-	csBakFile = csRunInfo + "/runcfg/version.dat";
-#endif
+	csBakFile = csRunInfo + SPLIT_SLASH_STR "runcfg" SPLIT_SLASH_STR "version.dat";
 	ofstream outfile (csBakFile,std::ofstream::binary);
 
 	CSmartPointer<IConfigInfo> spConfigRun;
@@ -946,12 +941,8 @@ bool CHealthManagerEntity::SaveFrameStartTimeForUpgrade()
 		DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("get runinfo path failed(%s)", SpStrError(eErr));
 		return false;
 	}
-	//TODO: CrossPlaform  [Gifur@2025730]
-#if defined(RVC_OS_WIN)
-	csBakFile = csRunInfo + "\\runcfg\\starttime.dat";
-#else
-	csBakFile = csRunInfo + "/runcfg/starttime.dat";
-#endif
+
+	csBakFile = csRunInfo + SPLIT_SLASH_STR "runcfg" SPLIT_SLASH_STR "starttime.dat";
 	ofstream outfile (csBakFile,std::ofstream::binary);
 
 	CSystemRunInfo sysRunInfo;

+ 2 - 1
Module/mod_interactivecontrol/mod_interactivecontrol.cpp

@@ -1630,6 +1630,7 @@ void CITCtrlEntity::OnFaceTrackingMsg(const char* pszFaceTrackingMsg)
 	CSimpleStringA strValue;
 	GetFunction()->GetSysVar("ActiveTrackingCamera", strValue); // E or O
 	CSimpleStringA strMsg = CSimpleStringA::Format("[%s] ", strValue.GetData());
+	//TODO: CrossPlaform  [Gifur@202584]
 #ifdef RVC_OS_WIN
 	SYSTEMTIME nowTime;                             // 系统时间结构体
 	GetLocalTime(&nowTime);
@@ -1639,7 +1640,7 @@ void CITCtrlEntity::OnFaceTrackingMsg(const char* pszFaceTrackingMsg)
 	time_t t = time(NULL);
 	pst = localtime(&t);
 	snprintf(strTime, MAX_PATH, "(%02d:%02d:%02d)", pst->tm_hour, pst->tm_min, pst->tm_sec);
-#endif // _WIN32
+#endif // RVC_OS_WIN
 	strMsg += pszFaceTrackingMsg;
 	strMsg += strTime;
 	FaceTrackingMsg evt;

+ 1 - 1
Module/mod_recorder/mod_recorder.cpp

@@ -44,7 +44,7 @@ using namespace Recorder;
 #define RVC_MIN_RECORD_FILESIZE 1024
 #endif
 
-//TODO: CrossPlaform  [Gifur@2025730]
+//TODO: CrossPlaform  1111 [Gifur@2025730]
 static unsigned long GetFileSize(const char* pfilename)
 {
 #ifdef RVC_OS_WIN

+ 2 - 2
Module/mod_upload/UploadFSM.cpp

@@ -626,7 +626,7 @@ namespace Task
 				string destDir="";
 				//根据路径类型组成最后移动路径
 				if(m_fsm->m_currUploadFile->path_type=="R"){
-					//TODO: CrossPlaform  [Gifur@2025730]
+					//TODO: CrossPlaform 1111  [Gifur@2025730]
 #ifdef RVC_OS_WIN
 					destPath = m_fsm->m_rootPath+"\\"+m_fsm->m_currUploadFile->after_deal_text+"\\"+m_fsm->m_currUploadFile->fileName;
 					destDir = m_fsm->m_rootPath+"\\"+m_fsm->m_currUploadFile->after_deal_text;
@@ -635,7 +635,7 @@ namespace Task
 					destDir = m_fsm->m_rootPath + SPLIT_SLASH_STR + m_fsm->m_currUploadFile->after_deal_text;
 #endif
 				}else{
-					//TODO: CrossPlaform  [Gifur@2025730]
+					//TODO: CrossPlaform  1111 [Gifur@2025730]
 #ifdef RVC_OS_WIN
 					destPath = m_fsm->m_currUploadFile->after_deal_text+"\\"+m_fsm->m_currUploadFile->fileName;
 #else