Skip to content
This repository
Browse code

Merge pull request #2732 from t4-ravenbird/darwin-ping

[fix] ping timeout option for darwin
  • Loading branch information...
commit dd0cce0d7a6ededa2844d0f4c79c39ebee582fe8 2 parents 795a693 + a43a263
davilla authored May 12, 2013

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  xbmc/network/linux/NetworkLinux.cpp
4  xbmc/network/linux/NetworkLinux.cpp
@@ -535,7 +535,11 @@ bool CNetworkLinux::PingHost(unsigned long remote_ip, unsigned int timeout_ms)
535 535
   struct in_addr host_ip; 
536 536
   host_ip.s_addr = remote_ip;
537 537
 
  538
+#if defined(TARGET_DARWIN)
  539
+  sprintf(cmd_line, "ping -c 1 -t %d %s", timeout_ms / 1000 + (timeout_ms % 1000) != 0, inet_ntoa(host_ip));
  540
+#else
538 541
   sprintf(cmd_line, "ping -c 1 -w %d %s", timeout_ms / 1000 + (timeout_ms % 1000) != 0, inet_ntoa(host_ip));
  542
+#endif
539 543
 
540 544
   int status = system (cmd_line);
541 545
 

0 notes on commit dd0cce0

Please sign in to comment.
Something went wrong with that request. Please try again.