HTTP访问出错也计入网络出错

超过3次重启设备
onereq
Matthew 3 months ago
parent 0b8c29eb91
commit f577a1be3d

@ -1608,8 +1608,6 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
}
else
{
m_ethernetFailures = 0;
unsigned int ip = 0;
unsigned int netMask = 0;
unsigned int gateway = 0;
@ -1695,6 +1693,22 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
img.clear();
netCaptureResult = requestCapture(localPhotoInfo.channel, localPhotoInfo.preset, netPhotoInfo, img);
if (netCaptureResult)
{
m_ethernetFailures = 0;
}
else
{
m_ethernetFailures++;
if (m_ethernetFailures > 3)
{
time_t rebootTime = GetRebootTime();
if (ts - rebootTime > 1800)
{
Reboot(REBOOT_TYPE_DEVICE, true, "Ethernet Not Existing");
}
}
}
if (netCaptureResult && !img.empty())
{
XYLOG(XYLOG_SEVERITY_INFO, "NetCapture Succeeded PHOTOID=%u Img Size=%u", localPhotoInfo.photoId, (uint32_t)img.size());

Loading…
Cancel
Save