mirror of
				https://github.com/rofafor/vdr-plugin-iptv.git
				synced 2023-10-10 11:37:03 +00:00 
			
		
		
		
	Fixed a nasty network byte order bug.
This commit is contained in:
		
							
								
								
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -203,3 +203,4 @@ VDR Plugin 'iptv' Revision History | ||||
| 2013-xx-xx: Version 1.2.2 | ||||
|  | ||||
| - 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) { | ||||
|      // First try only the IP address | ||||
|      *inAddrP = htonl(inet_addr(addrP)); | ||||
|      *inAddrP = inet_addr(addrP); | ||||
|      if (*inAddrP == htonl(INADDR_NONE)) { | ||||
|         debug("cIptvSocket::%s(%s): cannot convert to address", __FUNCTION__, addrP); | ||||
|         // 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))); | ||||
|            return false; | ||||
|            } | ||||
|         *inAddrP = htonl(inet_addr(*host->h_addr_list)); | ||||
|         *inAddrP = inet_addr(*host->h_addr_list); | ||||
|         } | ||||
|      return true; | ||||
|      } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user