gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20942 - gnunet/src/integration-tests


From: gnunet
Subject: [GNUnet-SVN] r20942 - gnunet/src/integration-tests
Date: Wed, 11 Apr 2012 15:45:11 +0200

Author: wachs
Date: 2012-04-11 15:45:11 +0200 (Wed, 11 Apr 2012)
New Revision: 20942

Modified:
   gnunet/src/integration-tests/connection_watchdog.c
Log:
- switch to netstat for compatiblity


Modified: gnunet/src/integration-tests/connection_watchdog.c
===================================================================
--- gnunet/src/integration-tests/connection_watchdog.c  2012-04-11 13:31:42 UTC 
(rev 20941)
+++ gnunet/src/integration-tests/connection_watchdog.c  2012-04-11 13:45:11 UTC 
(rev 20942)
@@ -203,10 +203,10 @@
   }
 
 
-  GNUNET_asprintf(&cmdline, "ss %s \\( sport = :%u or dport = :%u \\)", proto, 
port, port);
+  GNUNET_asprintf(&cmdline, "netstat -n %s | grep %u", proto, port);
 
-  if (system ("ss > /dev/null 2> /dev/null"))
-    if (system ("ss > /dev/null 2> /dev/null") == 0)
+  if (system ("netstat -n > /dev/null 2> /dev/null"))
+    if (system ("netstat -n > /dev/null 2> /dev/null") == 0)
       f = popen (cmdline, "r");
     else
       f = NULL;
@@ -219,10 +219,10 @@
     return -1;
   }
 
+  count = 0;
   while (NULL != fgets (line, sizeof (line), f))
   {
     /* read */
-
     //printf ("%s", line);
     count ++;
   }
@@ -310,7 +310,7 @@
     if (GNUNET_YES == have_tcp)
     {
       struct TransportPlugin * p = find_plugin ("tcp");
-      int low_level_connections_tcp = check_lowlevel_connections (p->port, 
tcp);
+      int low_level_connections_tcp = check_lowlevel_connections (p->port, 
p->protocol);
 
       if (low_level_connections_tcp != -1)
       {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]