优化日志信息

heatbeat
Matthew 3 months ago
parent fd88feeacd
commit d841200500

@ -1567,7 +1567,18 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
} }
else else
{ {
XYLOG(XYLOG_SEVERITY_INFO, "Ethernet is Available CH=%u PR=%X PHOTOID=%u", (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, localPhotoInfo.photoId); unsigned int ip = 0;
unsigned int netMask = 0;
unsigned int gateway = 0;
char buf[32] = { 0 };
if (GetNetInfo("eth0", ip, netMask, gateway))
{
// const
sockaddr_in addrIn = { AF_INET, 0, ip};
inet_ntop(AF_INET, &addrIn.sin_addr, buf, sizeof(buf)); //其中recvAddr为SOCKADDR_IN类型
}
XYLOG(XYLOG_SEVERITY_INFO, "Ethernet is Available Handle=%ld IP=%s CH=%u PR=%X PHOTOID=%u", (uint64_t)netHandle, buf, (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, localPhotoInfo.photoId);
} }
// SetStaticIp(); // SetStaticIp();

Loading…
Cancel
Save