diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index b3635549..ca73c134 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1728,22 +1728,7 @@ 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()) { if(img.size() <= 1000) @@ -1764,6 +1749,23 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c ethernetPowerCtrl.reset(); XYLOG(XYLOG_SEVERITY_DEBUG, "Ethernet Power OFF"); + 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 (!rgb.empty()) { time_t takingTime = ts;