@@ -443,6 +443,8 @@ bool CInfoReport_APIMachine::InfoReport_APIMachine_Software(XCHAR* ptszSWInfo, i
443443 XCHAR tszOSVersion[256 ] = {};
444444 XCHAR tszOSInfo[256 ] = {};
445445 XCHAR tszUPTime[256 ] = {};
446+ XCHAR tszUserName[256 ] = {};
447+ XCHAR tszComputerName[256 ] = {};
446448 XENGINE_LIBTIME st_LibTimer = {};
447449
448450 if (!SystemApi_System_GetSystemVer (tszOSInfo, tszOSVersion, tszOSBuild, &nOSProcessor))
@@ -463,20 +465,26 @@ bool CInfoReport_APIMachine::InfoReport_APIMachine_Software(XCHAR* ptszSWInfo, i
463465 InfoReport_dwErrorCode = SystemApi_GetLastError ();
464466 return false ;
465467 }
468+ SystemApi_System_GetSysName (tszUserName, tszComputerName);
466469
467470 sprintf (tszUPTime, " %04d-%02d-%02d %02d:%02d:%02d" , st_LibTimer.wYear , st_LibTimer.wMonth , st_LibTimer.wDay , st_LibTimer.wHour , st_LibTimer.wMinute , st_LibTimer.wSecond );
468471
469472 Json::Value st_JsonRoot;
473+ Json::Value st_JsonOSObject;
470474 Json::Value st_JsonSystem;
471475
472- st_JsonSystem[" OSUPTime" ] = tszUPTime;
473- st_JsonSystem[" OSVersion" ] = tszOSInfo;
474- st_JsonSystem[" OSVersion" ] = tszOSVersion;
475- st_JsonSystem[" OSBuild" ] = tszOSBuild;
476- st_JsonSystem[" OSArch" ] = (Json::Value::Int)nOSProcessor;
477- st_JsonSystem[" OSProcessCount" ] = nProcessCount;
476+ st_JsonOSObject[" OSUPTime" ] = tszUPTime;
477+ st_JsonOSObject[" OSVersion" ] = tszOSInfo;
478+ st_JsonOSObject[" OSVersion" ] = tszOSVersion;
479+ st_JsonOSObject[" OSBuild" ] = tszOSBuild;
480+ st_JsonOSObject[" OSArch" ] = (Json::Value::Int)nOSProcessor;
481+ st_JsonOSObject[" OSProcessCount" ] = nProcessCount;
482+
483+ st_JsonSystem[" tszUserName" ] = tszUserName;
484+ st_JsonSystem[" tszComputerName" ] = tszComputerName;
478485
479- st_JsonRoot[" OSInfo" ] = st_JsonSystem;
486+ st_JsonRoot[" OSInfo" ] = st_JsonOSObject;
487+ st_JsonRoot[" SystemInfo" ] = st_JsonSystem;
480488
481489 if (NULL != pInt_Len)
482490 {
0 commit comments