]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
modified name of timeout variable to prevent warning on solaris.
authorR.E. Wolff <R.E.Wolff@BitWizard.nl>
Mon, 23 Mar 2015 08:09:59 +0000 (09:09 +0100)
committerR.E. Wolff <R.E.Wolff@BitWizard.nl>
Mon, 23 Mar 2015 08:09:59 +0000 (09:09 +0100)
mtr.c
net.c

diff --git a/mtr.c b/mtr.c
index 0131570395e1f567e95de2bce78f35b0ccfc96ff..859e4f6f6ad562a25f927d3aba0ea8a678f4c676 100644 (file)
--- a/mtr.c
+++ b/mtr.c
@@ -89,7 +89,7 @@ int  fstTTL = 1;                /* default start at first hop */
 int   maxTTL = 30;              /* inline with traceroute */
                                 /* end ttl window stuff. */
 int remoteport = 80;            /* for TCP tracing */
-int timeout = 10 * 1000000;     /* for TCP tracing */
+int tcp_timeout = 10 * 1000000;     /* for TCP tracing */
 
 
 /* default display field(defined by key in net.h) and order */
@@ -458,8 +458,8 @@ void parse_arg (int argc, char **argv)
       }
       break;
     case 'Z':
-      timeout = atoi(optarg);
-      timeout *= 1000000;
+      tcp_timeout = atoi(optarg);
+      tcp_timeout *= 1000000;
       break;
     case '4':
       af = AF_INET;
diff --git a/net.c b/net.c
index d43054bacdd152a7ccfcd5fb9e324455a470b449..0ffffe9b9a2a091e997aa74829a9a7371ea0622d 100644 (file)
--- a/net.c
+++ b/net.c
@@ -209,7 +209,7 @@ extern int tos;                     /* type of service set in ping packet*/
 extern int af;                 /* address family of remote target */
 extern int mtrtype;            /* type of query packet used */
 extern int remoteport;          /* target port for TCP tracing */
-extern int timeout;             /* timeout for TCP connections */
+extern int tcp_timeout;             /* timeout for TCP connections */
 #ifdef SO_MARK
 extern int mark;               /* SO_MARK to set for ping packet*/
 #endif
@@ -1559,7 +1559,7 @@ void net_process_fds(fd_set *writefd)
     }
     if (fd > 0) {
       utime = sequence[at].time.tv_sec * 1000000L + sequence[at].time.tv_usec;
-      if (unow - utime > timeout) {
+      if (unow - utime > tcp_timeout) {
         close(fd);
         sequence[at].socket = 0;
       }