修复URL拼接错误

lowmem
Matthew 1 month ago
parent d75ad0949e
commit 4ca40f0424

@ -160,7 +160,7 @@ bool YuShiCtrl::TakePhoto(uint8_t streamID, std::vector<uint8_t>& img)
// Yu Shi
char url[128] = { 0 };
int streamSid = 0; // should put into config
snprintf(url, sizeof(url), "/LAPI/V1.0/Channels/%u/Media/Video/Streams/%d/Snapshot", (uint32_t)streamID, streamSid);
snprintf(url, sizeof(url), "http://%s/LAPI/V1.0/Channels/%u/Media/Video/Streams/%d/Snapshot", m_ip.c_str(), (uint32_t)streamID, streamSid);
int nRet = DoGetRequest(url, HTTP_AUTH_TYPE_DIGEST, m_userName.c_str(), m_password.c_str(), m_netHandle, img, &m_lastErrorCode);
return nRet == 0;

Loading…
Cancel
Save