Преглед изворни кода

Z991239-6460 #comment 部分内容验证和调整

80374374 пре 1 месец
родитељ
комит
9747ccc951

+ 7 - 5
Framework/libtoolkit/log_periodic.c

@@ -285,13 +285,15 @@ static int periodicfilefactory_record_log(void *self,
 			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));
+                        st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, 
+#if defined(_MSC_VER)
+				GetCurrentThreadId(), 
 #else
-            n = sprintf(tmp, LINE_BREAK_STR "[%02d:%02d:%02d.%03d][%5u][%s] ",
-                        st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, GetCurrentThreadIdFromSys(), log_level2str(level));
-#endif //_MSC_VER
+				GetCurrentThreadIdFromSys(),
+#endif
+				log_level2str(level));
 		}
 		_fwrite_nolock(tmp, n, 1, plog->fp);
 		_fwrite_nolock(s, sn, 1, plog->fp);

+ 0 - 9
Framework/spbase/SpEntityPrivilege.cpp

@@ -686,19 +686,10 @@ ErrorCodeEnum SpEntityPrivilege::RewriteDepVersion(const CSimpleStringA& strVers
 		DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("get dep ver txt failed!");
 		return rc;
 	}
-	else {
-		//TODO: 测试专用,待移除  [Gifur@20241016]
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("path:%s", path);
-	}
-
 	rc = UpdateVerTxt(path, strVersion, true);
 	if (rc == Error_Succeed && bRefresh) {
-		//TODO: 调试专用,后移除  [Gifur@20241015]
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("to refresh...");
 		rc = (ErrorCodeEnum)sp_dir_refresh_dep_path(dir);
 		if (rc == Error_Succeed) {
-			//TODO: 调试专用,后移除  [Gifur@20241015]
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("to send fresh post");
 			iobuffer_t* pkt = iobuffer_create(-1, -1);
 			rc = PostInfoShell(SHELL_CMD_INFO_REFRESH_ENV, &pkt);
 			if (pkt)

+ 3 - 1
Framework/spbase/sp_dir.c

@@ -14,7 +14,7 @@ int sp_dir_create(sp_dir_t **p_dir)
 	dir = shm_malloc(sizeof(sp_dir_t));
 	memset(dir, 0, sizeof(sp_dir_t));
 
-	//TODO(Gifur): duplicate path value set, which would makd memory leak
+	
 	GetModuleFileNameA(NULL, tmp, MAX_PATH);
 	*strrchr(tmp, SPLIT_SLASH) = 0;
 	//C:/Run/version/1.2.3.4/bin
@@ -24,6 +24,8 @@ int sp_dir_create(sp_dir_t **p_dir)
 	dir->base_path = shm_strdup(tmp);
 	*strrchr(tmp, SPLIT_SLASH) = 0;
 	//C:/Run/version
+	// 
+	//TODO(Gifur): duplicate path value set, which would makd memory leak
 	dir->root_ver_path = shm_strdup(tmp);
 	*strrchr(tmp, SPLIT_SLASH) = 0;
 	//C:/Run

+ 1 - 1
Framework/spbase/sp_var.c

@@ -59,7 +59,7 @@ static char* sp_var_get_own_entity(sp_var_client_t* client, const char* key)
 static int sp_var_can_write(sp_var_client_t *client, const char *key, sp_cfg_shell_sysevent_t **p_sysevent)
 {
 	sp_iom_t *iom = sp_svc_get_iom(client->svc);
-	sp_cfg_t *cfg = sp_get_env()->cfg; //TODO
+	sp_cfg_t *cfg = sp_get_env()->cfg;
 	sp_cfg_shell_sysevent_t *sysevent;
 
 	sysevent = sp_cfg_get_sysevent(cfg, key);

+ 0 - 8
Framework/spshell/svc.cpp

@@ -618,15 +618,11 @@ void on_fresh_env(sp_rpc_server_t* server, int epid, int svc_id, int call_type,
 		if (!values[i].IsStartWith(strPrefix)) {
 			if (!strNewPath.IsNullOrEmpty()) strNewPath += ENV_SEP_STR;
 			strNewPath += values[i];
-			//TODO: 测试代码,后续移除  [Gifur@20241015]
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("toadd:%s", values[i].GetData());
 		}
 	}
 	if (env->dir->dep_ver_path != NULL) {
 		if (!strNewPath.IsNullOrEmpty()) strNewPath += ENV_SEP_STR;
 		strNewPath += env->dir->dep_ver_path;
-		//TODO: 测试代码,后续移除  [Gifur@20241015]
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("toadd1:%s", env->dir->dep_ver_path);
 	}
 	char vendorName[128];
 	size = 127;
@@ -636,14 +632,10 @@ void on_fresh_env(sp_rpc_server_t* server, int epid, int svc_id, int call_type,
 		CSimpleStringA strSubDep(env->dir->dep_ver_path);
 		strSubDep += SPLIT_SLASH_STR;
 		strSubDep += vendorName;
-		//TODO: 测试代码,后续移除  [Gifur@20241015]
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("toadd1:%s", strSubDep.GetData());
 		if (!strNewPath.IsNullOrEmpty()) strNewPath += ENV_SEP_STR;
 		strNewPath += strSubDep;
 	}
 	toolkit_setenv(name, strNewPath.GetData());
-	//TODO: 测试代码,后续移除  [Gifur@20241015]
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("renew env:%s", strNewPath.GetData());
 }
 
 typedef struct

+ 0 - 1
Module/mod_CustMngrAuth/CustMngrAuthFSM.cpp

@@ -792,7 +792,6 @@ void CCustMngrAuthFSM::DeleteBmp(int type)
 	}
 }
 
-//TODO: CrossPlaform  !!!!!! [Gifur@2025728]
 ErrorCodeEnum CCustMngrAuthFSM::DeleteFileIfExisted(const char* fileName)
 {
 	CSimpleStringA strPath, strObjPath;

+ 0 - 1
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -85,7 +85,6 @@ namespace {
 
 	void InitializeOtherLogSwitch(CEntityBase* pEntity, const CSimpleStringA& strModuleName)
 	{
-		LOG_FUNCTION();
 		if (pEntity == NULL || strModuleName.IsNullOrEmpty()) {
 			return;
 		}

+ 0 - 1
Module/mod_localmediaplay/AdvertManage/BaseFun.cpp

@@ -19,7 +19,6 @@
 #endif // !RVC_MAX_INI_LEN
 
 
-//TODO: CrossPlaform  改成使用 SpUtilty.h 中的 S2W 接口 [Gifur@2025730]
 void StringToWstring(std::wstring& szDst, std::string str)
 {
 #ifdef RVC_OS_WIN