|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
|
|
|
void HttpsLogCallBack(const char* logtxt) {
|
|
|
- DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI("HttpsLogCallBack")("HttpsLogCallBack: %s.", logtxt);
|
|
|
+ //DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI("HttpsLogCallBack")("HttpsLogCallBack: %s.", logtxt);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -12,21 +12,17 @@ int post_video_recordinfo_list(video_record_info_t* pinfo, int itimeout, bool bp
|
|
|
{
|
|
|
int iret = -1;
|
|
|
IHttpFunc* client = create_http(HttpsLogCallBack);
|
|
|
-
|
|
|
RecordInfoHTTPReq req;
|
|
|
req.m_timeOut = itimeout;
|
|
|
if (bprintdbg) {
|
|
|
req.m_printDbg = true;
|
|
|
}
|
|
|
-
|
|
|
const char* pData = pinfo->strServerURL.GetData();
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("strServerURL = %s.", pData);
|
|
|
if (pData) {
|
|
|
req.m_url = pData;
|
|
|
}
|
|
|
|
|
|
pData = pinfo->strAPI.GetData();
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("strAPI = %s.", pData);
|
|
|
if (pData) {
|
|
|
req.m_url.append(pData);
|
|
|
}
|
|
@@ -34,25 +30,21 @@ int post_video_recordinfo_list(video_record_info_t* pinfo, int itimeout, bool bp
|
|
|
Json::Value rootReq;
|
|
|
|
|
|
pData = pinfo->strTerminalNo.GetData();
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("strTerminalNo = %s.", pData);
|
|
|
if (pData) {
|
|
|
rootReq["terminal_no"] = pData;
|
|
|
}
|
|
|
|
|
|
pData = pinfo->strAppVersion.GetData();
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("strAppVersion = %s.", pData);
|
|
|
if (pData) {
|
|
|
rootReq["app_version"] = pData;
|
|
|
}
|
|
|
|
|
|
pData = pinfo->strRecordEndTime.GetData();
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("strRecordEndTime = %s.", pData);
|
|
|
if (pData) {
|
|
|
rootReq["upload_time"] = pData;
|
|
|
}
|
|
|
|
|
|
pData = pinfo->strRecordID.GetData();
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("strRecordID = %s.", pData);
|
|
|
if (pData) {
|
|
|
rootReq["video_serial_id"] = pData;
|
|
|
}
|
|
@@ -64,8 +56,6 @@ int post_video_recordinfo_list(video_record_info_t* pinfo, int itimeout, bool bp
|
|
|
item["file_name"] = it->file_name;
|
|
|
item["file_path"] = it->file_path;
|
|
|
item["file_length"] = it->file_length;
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("file path = %s.", it->file_path.c_str());
|
|
|
-
|
|
|
rootReq["file_list"].append(item);
|
|
|
}
|
|
|
|
|
@@ -74,7 +64,7 @@ int post_video_recordinfo_list(video_record_info_t* pinfo, int itimeout, bool bp
|
|
|
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_reqContent is %s.", req.m_reqContent.c_str());
|
|
|
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("begin http get request, timeout is %d, printdbg flag is %s.", req.m_timeOut, req.m_printDbg ? "true" : "false");
|
|
|
+ //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("begin http get request, timeout is %d, printdbg flag is %s.", req.m_timeOut, req.m_printDbg ? "true" : "false");
|
|
|
|
|
|
RecordInfoHTTPRet ret;
|
|
|
if (client->Post(req, ret)) {
|
|
@@ -83,7 +73,7 @@ int post_video_recordinfo_list(video_record_info_t* pinfo, int itimeout, bool bp
|
|
|
iret = 0;
|
|
|
}
|
|
|
else {
|
|
|
- //LogWarn(Severity_Middle, Error_Exception, LOG_EVT_POST_RECORDINFO_FAILED, CSimpleStringA::Format("Post video record infos fail, url=%s, syscode=%d, usercode=%s, errmsg=%s", req.m_url.c_str(), ret.m_sysCode, ret.m_userCode.c_str(), ret.m_errMsg.c_str()).GetData());
|
|
|
+ LogWarn(Severity_Middle, Error_Exception, LOG_EVT_POST_RECORDINFO_FAILED, CSimpleStringA::Format("Post video record infos fail, url=%s, syscode=%d, usercode=%s, errmsg=%s", req.m_url.c_str(), ret.m_sysCode, ret.m_userCode.c_str(), ret.m_errMsg.c_str()).GetData());
|
|
|
}
|
|
|
|
|
|
return iret;
|