From 6b79e37122997ca39e61d603418f1b31957a7057 Mon Sep 17 00:00:00 2001 From: Roger Wolff Date: Sun, 7 Mar 1999 00:00:00 +0000 Subject: [PATCH] mtr v0.32 - Fixed the FreeBSD bug detection stuff. source: ftp://ftp.bitwizard.nl/mtr/mtr-0.32.tar.gz --- Makefile.am | 4 +++- Makefile.dist | 16 ++++++++++++++++ NEWS | 2 ++ TODO | 14 +++++++++----- configure.in | 2 +- gtk.c | 5 ++++- net.c | 2 +- 7 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 Makefile.dist diff --git a/Makefile.am b/Makefile.am index 00b60c5..b6b3032 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,9 @@ EXTRA_mtr_SOURCES = curses.c \ mtr_DEPENDENCIES = $(GTK_OBJ) $(CURSES_OBJ) mtr_LDFLAGS = $(GTK_OBJ) $(CURSES_OBJ) -EXTRA_DIST = SECURITY mtr.8 +EXTRA_DIST = SECURITY mtr.8 Makefile Makefile.dist +distclean-local: + cp Makefile.dist Makefile DISTCLEANFILES = *~ diff --git a/Makefile.dist b/Makefile.dist new file mode 100644 index 0000000..99680ad --- /dev/null +++ b/Makefile.dist @@ -0,0 +1,16 @@ + +# +# This is an attempt on simplifying the compilation of mtr to a simple "make". +# + +firstrule: + ./configure + $(MAKE) + +clean: + rm -f *.o *~ core + +distclean: clean + rm -f mtr config.cache config.status config.log \ + stamp-h stamp-h[0-9]* TAGS ID + diff --git a/NEWS b/NEWS index b17c116..e48abd1 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ WHAT'S NEW? + v0.32 Fixed the FreeBSD bug detection stuff. + v0.31 Fixed a few documentation issues. -- Matt Changed the autoconf stuff to find the resolver library on Solaris. -- REW diff --git a/TODO b/TODO index 729cf05..e95455e 100644 --- a/TODO +++ b/TODO @@ -27,12 +27,21 @@ not be reset at the start of the "round". This way if you probe slowly (relative to the RTT time to the end host), it can probe all hosts in the first "round". + -- DONE. + + - allow "keyboard navigation" in the GTK version. + - Bugs to fix? - Do something useful if host couldn't be resolved. + - Revert to curses mode even if DISPLAY is set, but a problem + prevents us from running in X11 mode. + --> The problem is that gtk_init simply calls exit for us if + it finds a problem. Tricky! Suggestions welcome. + - Nice to have: - stop sending packets when a new host is getting entered. @@ -43,11 +52,6 @@ - Check why it still tries to go for X11 display if DISPLAY is unset. (I saw code to handle this) - - Revert to curses mode even if DISPLAY is set, but a problem - prevents us from running in X11 mode. - --> The problem is that gtk_init simply calls exit for us if - it finds a problem. Tricky! Suggestions welcome. - - Read environment variable "MTR_DEFAULTS" as a commandline before parsing the commandline. -- DONE. (ok it's MTR_OPTIONS.) diff --git a/configure.in b/configure.in index f0da779..3f94224 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(mtr.c) -AM_INIT_AUTOMAKE(mtr, 0.31) +AM_INIT_AUTOMAKE(mtr, 0.32) AC_SUBST(GTK_OBJ) AC_SUBST(CURSES_OBJ) diff --git a/gtk.c b/gtk.c index 20c5520..3835395 100644 --- a/gtk.c +++ b/gtk.c @@ -50,7 +50,10 @@ void gtk_do_init(int *argc, char ***argv) { int gtk_detect(int *argc, char ***argv) { if(getenv("DISPLAY") != NULL) { - gtk_do_init(argc, argv); + /* If we do this here, gtk_init exits on an error. This happens + BEFORE the user has had a chance to tell us not to use the + display... */ + /* gtk_do_init(argc, argv); */ return TRUE; } else { return FALSE; diff --git a/net.c b/net.c index 998236e..52358dc 100644 --- a/net.c +++ b/net.c @@ -214,7 +214,7 @@ void net_send_query(int hops) { rv = sendto(sendsock, packet, packetsize, 0, (struct sockaddr *)&remoteaddress, sizeof(remoteaddress)); - if (first && (rv == EINVAL)) { + if (first && (rv < 0) && (errno == EINVAL)) { first = 0; ip->len = packetsize; rv = sendto(sendsock, packet, packetsize, 0, -- 2.47.2