|
@@ -162,7 +162,7 @@ SATHTTP_API int Login(std::string url, const SATHTTP::STLoginReq &stLoginReq, SA
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(pText)+"\n");
|
|
|
+ //OutputDebugString(CString(pText)+"\n");
|
|
|
#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
@@ -187,7 +187,7 @@ SATHTTP_API int Login(std::string url, const SATHTTP::STLoginReq &stLoginReq, SA
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
@@ -289,7 +289,7 @@ SATHTTP_API int UpdateDeviceMessage(std::string url, const SATHTTP::STUpdateDevi
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(pText)+"\n");
|
|
|
+ //OutputDebugString(CString(pText)+"\n");
|
|
|
#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
@@ -314,7 +314,7 @@ SATHTTP_API int UpdateDeviceMessage(std::string url, const SATHTTP::STUpdateDevi
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
@@ -594,7 +594,7 @@ SATHTTP_API int SetResult(std::string url, const SATHTTP::STNotifyJobStartReq &s
|
|
|
post_data.append(pText);
|
|
|
//post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(pText)+"\n");
|
|
|
+ //OutputDebugString(CString(pText)+"\n");
|
|
|
#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
@@ -619,7 +619,7 @@ SATHTTP_API int SetResult(std::string url, const SATHTTP::STNotifyJobStartReq &s
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
@@ -716,7 +716,7 @@ SATHTTP_API int SetResultList(std::string url, const SATHTTP::STJobProcessReq &s
|
|
|
post_data.append(CharEncoding::EnCode_GB2312URL(pText));
|
|
|
//post_data.append(pText);
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(pText)+"\n");
|
|
|
+ //OutputDebugString(CString(pText)+"\n");
|
|
|
#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
@@ -741,7 +741,7 @@ SATHTTP_API int SetResultList(std::string url, const SATHTTP::STJobProcessReq &s
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
@@ -801,7 +801,7 @@ SATHTTP_API int GetCaseFileListUrl(std::string url, std::string strCaseId, SATHT
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(pText)+"\n");
|
|
|
+ //OutputDebugString(CString(pText)+"\n");
|
|
|
#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
@@ -826,7 +826,7 @@ SATHTTP_API int GetCaseFileListUrl(std::string url, std::string strCaseId, SATHT
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
@@ -894,6 +894,9 @@ SATHTTP_API int DownloadScript(std::string url, std::string strCaseId, std::stri
|
|
|
char *pText = cJSON_Print(pRoot);
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString((std::string(pText)+"\n").c_str());
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -945,7 +948,7 @@ SATHTTP_API int DownloadScript(std::string url, std::string strCaseId, std::stri
|
|
|
// 创建目录;
|
|
|
if ( MKDIR(strSaveDir.c_str()) ) {
|
|
|
// 同时下载脚本目录到指定目录中;
|
|
|
- if ( g_curl.Download(stScriptUrlResp.strURL, strSaveDir, 10000) ) {
|
|
|
+ if ( g_curl.Download(stScriptUrlResp.strURL, strSaveDir, 20000) ) {
|
|
|
stScriptUrlResp._strFileName = strFileName.substr(0, strFileName.find_first_of('.'));
|
|
|
stScriptUrlResp._strScripFile = strSaveDir;
|
|
|
// 释放内存;
|
|
@@ -1016,7 +1019,7 @@ SATHTTP_API int StopTaskFromRunner(std::string url, std::string strInstnaceId, S
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
@@ -1074,7 +1077,7 @@ SATHTTP_API int SaveCaseOrTaskLog(std::string url, const SATHTTP::STSaveLogReq &
|
|
|
// POST表单提交,此处不需要转url格式,注意避坑!
|
|
|
std::string post_data = pText;
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(pText)+"\n");
|
|
|
+ //OutputDebugString(CString(pText)+"\n");
|
|
|
#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
@@ -1099,7 +1102,7 @@ SATHTTP_API int SaveCaseOrTaskLog(std::string url, const SATHTTP::STSaveLogReq &
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
@@ -1176,7 +1179,7 @@ SATHTTP_API int SaveResultFile(std::string url, const SATHTTP::STSaveFileReq &st
|
|
|
// POST表单提交,此处不需要转url格式,注意避坑!
|
|
|
std::string post_data = pText;
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(pText)+"\n");
|
|
|
+ //OutputDebugString(CString(pText)+"\n");
|
|
|
#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
@@ -1201,7 +1204,7 @@ SATHTTP_API int SaveResultFile(std::string url, const SATHTTP::STSaveFileReq &st
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
#ifdef _DEBUG
|
|
|
- OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|