From: R.E. Wolff Date: Mon, 23 Mar 2015 08:09:59 +0000 (+0100) Subject: modified name of timeout variable to prevent warning on solaris. X-Git-Tag: v0.87~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=effef18b359c78a968de28cb1090866e974bd34f;p=thirdparty%2Fmtr.git modified name of timeout variable to prevent warning on solaris. --- diff --git a/mtr.c b/mtr.c index 0131570..859e4f6 100644 --- 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 d43054b..0ffffe9 100644 --- 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; }