|
@@ -161,6 +161,9 @@ SATHTTP_API int Login(std::string url, const SATParameters::STLoginReq &stLoginR
|
|
|
char *pText = cJSON_Print(pRoot);
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(pText)+"\n");
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -183,7 +186,9 @@ SATHTTP_API int Login(std::string url, const SATParameters::STLoginReq &stLoginR
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|
|
@@ -283,6 +288,9 @@ SATHTTP_API int UpdateDeviceMessage(std::string url, const SATParameters::STUpda
|
|
|
char *pText = cJSON_Print(pRoot);
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(pText)+"\n");
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -305,7 +313,9 @@ SATHTTP_API int UpdateDeviceMessage(std::string url, const SATParameters::STUpda
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|
|
@@ -380,6 +390,9 @@ SATHTTP_API int Heartbeat(std::string url, const SATParameters::STHeartbeatReq &
|
|
|
char *pText = cJSON_Print(pRoot);
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
+#ifdef _DEBUG
|
|
|
+ //OutputDebugString(CString(pText)+"\n");
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -402,7 +415,9 @@ SATHTTP_API int Heartbeat(std::string url, const SATParameters::STHeartbeatReq &
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|
|
@@ -442,6 +457,7 @@ SATHTTP_API int Heartbeat(std::string url, const SATParameters::STHeartbeatReq &
|
|
|
stTask.Id = cJSON_GetObjectItem(pTask, "id") ? cJSON_GetObjectItem(pTask, "id")->valueint : -1;
|
|
|
stTask.fd = cJSON_GetObjectItem(pTask, "fd") ? cJSON_GetObjectItem(pTask, "fd")->valueint : -1;
|
|
|
stTask.nTaskId = cJSON_GetObjectItem(pTask, "taskId") ? cJSON_GetObjectItem(pTask, "taskId")->valueint : -1;
|
|
|
+ //stTask.strTaskId = cJSON_GetObjectItem(pTask, "taskId") ? cJSON_GetObjectItem(pTask, "taskId")->valuestring : "0";
|
|
|
// email其实可忽略;
|
|
|
cJSON *pEmals = cJSON_GetObjectItem(pTask, "emails");
|
|
|
if ( pEmals )
|
|
@@ -577,6 +593,9 @@ SATHTTP_API int SetResult(std::string url, const SATParameters::STNotifyJobStart
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(pText);
|
|
|
//post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(pText)+"\n");
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -599,7 +618,9 @@ SATHTTP_API int SetResult(std::string url, const SATParameters::STNotifyJobStart
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|
|
@@ -694,6 +715,9 @@ SATHTTP_API int SetResultList(std::string url, const SATParameters::STJobProcess
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(CharEncoding::EnCode_GB2312URL(pText));
|
|
|
//post_data.append(pText);
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(pText)+"\n");
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -716,7 +740,9 @@ SATHTTP_API int SetResultList(std::string url, const SATParameters::STJobProcess
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|
|
@@ -774,6 +800,9 @@ SATHTTP_API int GetCaseFileListUrl(std::string url, std::string strCaseId, SATPa
|
|
|
char *pText = cJSON_Print(pRoot);
|
|
|
std::string post_data = "requestMsg=";
|
|
|
post_data.append(CharEncoding::EnCode_UTF8URL(pText));
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(pText)+"\n");
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -796,7 +825,9 @@ SATHTTP_API int GetCaseFileListUrl(std::string url, std::string strCaseId, SATPa
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|
|
@@ -1001,7 +1032,9 @@ SATHTTP_API int StopTaskFromRunner(std::string url, std::string strInstnaceId, S
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|
|
@@ -1057,6 +1090,9 @@ SATHTTP_API int SaveCaseOrTaskLog(std::string url, const SATParameters::STSaveLo
|
|
|
//std::string post_data = CharEncoding::EnCode_UTF8URL(pText);
|
|
|
// POST表单提交,此处不需要转url格式,注意避坑!
|
|
|
std::string post_data = pText;
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(pText)+"\n");
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -1079,7 +1115,9 @@ SATHTTP_API int SaveCaseOrTaskLog(std::string url, const SATParameters::STSaveLo
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|
|
@@ -1154,6 +1192,9 @@ SATHTTP_API int SaveResultFile(std::string url, const SATParameters::STSaveFileR
|
|
|
//std::string post_data = CharEncoding::EnCode_UTF8URL(pText);
|
|
|
// POST表单提交,此处不需要转url格式,注意避坑!
|
|
|
std::string post_data = pText;
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(pText)+"\n");
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -1176,7 +1217,9 @@ SATHTTP_API int SaveResultFile(std::string url, const SATParameters::STSaveFileR
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|
|
@@ -1237,6 +1280,9 @@ SATHTTP_API int SaveResultImg(std::string url, const SATParameters::STSaveImgReq
|
|
|
//std::string post_data = CharEncoding::EnCode_UTF8URL(pText);
|
|
|
// POST表单提交,此处不需要转url格式,注意避坑!
|
|
|
std::string post_data = pText;
|
|
|
+#ifdef _DEBUG
|
|
|
+ //OutputDebugString(CString(pText)+"\n");
|
|
|
+#endif
|
|
|
|
|
|
// 释放堆内存;
|
|
|
if (pText)
|
|
@@ -1259,7 +1305,9 @@ SATHTTP_API int SaveResultImg(std::string url, const SATParameters::STSaveImgReq
|
|
|
if ( curlCode == CURLE_OK )
|
|
|
{
|
|
|
reponse = CharEncoding::DeCode_URLUTF8(reponse.c_str());
|
|
|
-
|
|
|
+#ifdef _DEBUG
|
|
|
+ //OutputDebugString(CString(reponse.c_str())+"\n");
|
|
|
+#endif
|
|
|
// 解析返回值;
|
|
|
pRoot = cJSON_Parse(reponse.c_str());
|
|
|
if (pRoot != NULL)
|