|
|
@ -488,7 +488,7 @@ int32_t CPhoneDevice::CJpegCamera::getOutputFormat() const
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CPhoneDevice::CPhoneDevice(JavaVM* vm, jobject service, const std::string& appPath, uint64_t activeNetHandle, unsigned int versionCode, const std::string& nativeLibDir)
|
|
|
|
CPhoneDevice::CPhoneDevice(JavaVM* vm, jobject service, const std::string& appPath, uint64_t activeNetHandle, unsigned int versionCode, const std::string& nativeLibDir)
|
|
|
|
: mVersionCode(versionCode), m_nativeLibraryDir(nativeLibDir), m_network(NULL), m_defNetHandle(activeNetHandle), m_ethnetHandle(NETWORK_UNSPECIFIED)
|
|
|
|
: mVersionCode(versionCode), m_nativeLibraryDir(nativeLibDir), m_network(NULL), m_defNetHandle(activeNetHandle), m_ethnetHandle(NETWORK_UNSPECIFIED), m_ethernetFailures(0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mCamera = NULL;
|
|
|
|
mCamera = NULL;
|
|
|
|
m_listener = NULL;
|
|
|
|
m_listener = NULL;
|
|
|
@ -1571,15 +1571,28 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
|
|
|
|
if (netHandle == 0)
|
|
|
|
if (netHandle == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// timeout
|
|
|
|
// timeout
|
|
|
|
|
|
|
|
m_ethernetFailures++;
|
|
|
|
|
|
|
|
|
|
|
|
std::string pwrStatus = powerCtrlPtr->GetStatus();
|
|
|
|
std::string pwrStatus = powerCtrlPtr->GetStatus();
|
|
|
|
pwrStatus += ethernetPowerCtrl->GetStatus();
|
|
|
|
pwrStatus += ethernetPowerCtrl->GetStatus();
|
|
|
|
XYLOG(XYLOG_SEVERITY_ERROR, "Ethernet Not Existing CH=%u PR=%X PHOTOID=%u PWR:%s",
|
|
|
|
XYLOG(XYLOG_SEVERITY_ERROR, "Ethernet Not Existing CH=%u PR=%X PHOTOID=%u EthFailures=%u PWR:%s",
|
|
|
|
(uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, localPhotoInfo.photoId, pwrStatus.c_str());
|
|
|
|
(uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, localPhotoInfo.photoId, m_ethernetFailures, pwrStatus.c_str());
|
|
|
|
TakePhotoCb(0, localPhotoInfo, "", 0);
|
|
|
|
TakePhotoCb(0, localPhotoInfo, "", 0);
|
|
|
|
|
|
|
|
if (m_ethernetFailures > 3)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
time_t rebootTime = GetRebootTime();
|
|
|
|
|
|
|
|
if (ts - rebootTime > 1800)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Reboot(REBOOT_TYPE_DEVICE, false, "Ethernet Not Existing");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
m_ethernetFailures = 0;
|
|
|
|
|
|
|
|
|
|
|
|
unsigned int ip = 0;
|
|
|
|
unsigned int ip = 0;
|
|
|
|
unsigned int netMask = 0;
|
|
|
|
unsigned int netMask = 0;
|
|
|
|
unsigned int gateway = 0;
|
|
|
|
unsigned int gateway = 0;
|
|
|
|