[fix][ios] ping ; timeout option not supported
authort4.ravenbird <t4.ravenbird@gmail.com>
Sun, 16 Jun 2013 19:34:29 +0000 (21:34 +0200)
committert4.ravenbird <t4.ravenbird@gmail.com>
Sun, 16 Jun 2013 19:34:29 +0000 (21:34 +0200)
xbmc/network/linux/NetworkLinux.cpp

index 7c1e003..726d4e4 100644 (file)
@@ -538,7 +538,9 @@ bool CNetworkLinux::PingHost(unsigned long remote_ip, unsigned int timeout_ms)
   struct in_addr host_ip; 
   host_ip.s_addr = remote_ip;
 
-#if defined(TARGET_DARWIN)
+#if defined (TARGET_DARWIN_IOS) // no timeout option available
+  sprintf(cmd_line, "ping -c 1 %s", inet_ntoa(host_ip));
+#elif defined (TARGET_DARWIN)
   sprintf(cmd_line, "ping -c 1 -t %d %s", timeout_ms / 1000 + (timeout_ms % 1000) != 0, inet_ntoa(host_ip));
 #else
   sprintf(cmd_line, "ping -c 1 -w %d %s", timeout_ms / 1000 + (timeout_ms % 1000) != 0, inet_ntoa(host_ip));