优化网络访问代码

lowmem
Matthew 2 months ago
parent 82e8212027
commit 58d8c614ab

@ -1649,6 +1649,7 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
}
else
{
#if 0
unsigned int ip = 0;
unsigned int netMask = 0;
unsigned int gateway = 0;
@ -1664,6 +1665,8 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
}
XYLOG(XYLOG_SEVERITY_INFO, "Ethernet is Available Handle=%llu IP=%s CH=%u PR=%X PHOTOID=%u", (uint64_t)netHandle, buf, (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, localPhotoInfo.photoId);
#endif
XYLOG(XYLOG_SEVERITY_INFO, "Ethernet is Available Handle=%llu CH=%u PR=%X PHOTOID=%u", (uint64_t)netHandle, (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, localPhotoInfo.photoId);
}
if (mBuildTime < 1738166400)
@ -1696,6 +1699,7 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
for (; idx < 128; idx++)
{
netHandle = GetEthnetHandle();
vendorCtrl->UpdateNetHandle(netHandle);
netPhotoInfo.netHandle = netHandle;
XYLOG(XYLOG_SEVERITY_INFO, "NetCapture %d NetHandle=%lld PHOTOID=%u", idx, netHandle, localPhotoInfo.photoId);
@ -5136,6 +5140,7 @@ void CPhoneDevice::SetStaticIp()
unsigned int netMask = 0;
unsigned int gateway = 0;
std::string ipStr = m_network->ip;
#if 0
if (GetNetInfo("eth0", ip, netMask, gateway))
{
// const
@ -5147,10 +5152,10 @@ void CPhoneDevice::SetStaticIp()
ipStr = "0.0.0.0";
}
}
SetStaticIp(m_network->iface, ipStr, m_network->netmask, m_network->gateway);
XYLOG(XYLOG_SEVERITY_INFO, "Set Static IP on %s: %s(%s)", m_network->iface.c_str(),
m_network->ip.c_str(), ipStr.c_str());
#endif
}
else
{

Loading…
Cancel
Save