mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Fixed a nasty network byte order bug.
This commit is contained in:
parent
0c6257e4ca
commit
f30817677e
1
HISTORY
1
HISTORY
@ -203,3 +203,4 @@ VDR Plugin 'iptv' Revision History
|
|||||||
2013-xx-xx: Version 1.2.2
|
2013-xx-xx: Version 1.2.2
|
||||||
|
|
||||||
- Enabled I/O throttling and tweaked buffer timeouts.
|
- Enabled I/O throttling and tweaked buffer timeouts.
|
||||||
|
- Fixed a nasty network byte order bug.
|
||||||
|
4
socket.c
4
socket.c
@ -93,7 +93,7 @@ bool cIptvSocket::CheckAddress(const char *addrP, in_addr_t *inAddrP)
|
|||||||
{
|
{
|
||||||
if (inAddrP) {
|
if (inAddrP) {
|
||||||
// First try only the IP address
|
// First try only the IP address
|
||||||
*inAddrP = htonl(inet_addr(addrP));
|
*inAddrP = inet_addr(addrP);
|
||||||
if (*inAddrP == htonl(INADDR_NONE)) {
|
if (*inAddrP == htonl(INADDR_NONE)) {
|
||||||
debug("cIptvSocket::%s(%s): cannot convert to address", __FUNCTION__, addrP);
|
debug("cIptvSocket::%s(%s): cannot convert to address", __FUNCTION__, addrP);
|
||||||
// It may be a host name, get the name
|
// It may be a host name, get the name
|
||||||
@ -104,7 +104,7 @@ bool cIptvSocket::CheckAddress(const char *addrP, in_addr_t *inAddrP)
|
|||||||
strerror_r(h_errno, tmp, sizeof(tmp)));
|
strerror_r(h_errno, tmp, sizeof(tmp)));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*inAddrP = htonl(inet_addr(*host->h_addr_list));
|
*inAddrP = inet_addr(*host->h_addr_list);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user