]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
mtr v0.27 v0.27
authorRoger Wolff <r.e.wolff@bitwizard.nl>
Mon, 2 Nov 1998 00:00:00 +0000 (00:00 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 3 Feb 2013 20:45:36 +0000 (20:45 +0000)
 - Fixed bug that showed up on Solaris/x86.
 - GTK mainloop now runs as it's supposed to.

source: ftp://ftp.bitwizard.nl/mtr/mtr-0.27.tar.gz

Makefile.am
NEWS
configure.in
gtk.c
net.c

index f7ee2b40b21d4cdaba05b2bdfae9a1455c8d9d02..00b60c53e7c0dcc345b185116dc61a098a170355 100644 (file)
@@ -22,3 +22,6 @@ mtr_DEPENDENCIES = $(GTK_OBJ) $(CURSES_OBJ)
 mtr_LDFLAGS = $(GTK_OBJ) $(CURSES_OBJ)
 
 EXTRA_DIST = SECURITY mtr.8
+
+DISTCLEANFILES = *~
+
diff --git a/NEWS b/NEWS
index f28612b7534abfacd4c87df95b9795b835a6b5fe..60aa2aba52101ffb2eb7a81c80969ea6b4016121 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 WHAT'S NEW?
 
+  v0.27
+       Fixed bug that showed up on Solaris/x86.
+       Gimp mainloop now runs as it's supposed to.
+
   v0.26
         Added "-n" flag for numeric output. 
         fixed IP numbers displaying backwards.
index 1fcb9b359b6e2b33720b724ae609d025f35cc927..a0d27ab38a564a118d70df8750be06da14e322b6 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT(mtr.c)
-AM_INIT_AUTOMAKE(mtr, 0.26)
+AM_INIT_AUTOMAKE(mtr, 0.27)
 
 AC_SUBST(GTK_OBJ)
 AC_SUBST(CURSES_OBJ)
diff --git a/gtk.c b/gtk.c
index ea266726338ed2a15e366cf2fab8bbd2321b8f8e..8f0d88d4d0e082c6b98a3b730fee3644c0ad25cd 100644 (file)
--- a/gtk.c
+++ b/gtk.c
@@ -36,6 +36,8 @@ extern char *Hostname;
 extern float WaitTime;
 extern float DeltaTime;
 
+static int tag;
+
 void gtk_do_init(int *argc, char ***argv) {
   static int done = 0;
 
@@ -305,6 +307,8 @@ int gtk_keyaction() {
 gint gtk_ping(gpointer data) {
   gtk_redraw();
   net_send_batch();
+  gtk_timeout_remove (tag);
+  tag = gtk_timeout_add(DeltaTime*1000, gtk_ping, NULL);
   return TRUE;
 }
 
@@ -321,7 +325,7 @@ void gtk_dns_data(gpointer data, gint fd, GdkInputCondition cond) {
 
 void gtk_loop() {
   DeltaTime = WaitTime/10;
-  gtk_timeout_add(DeltaTime*1000, gtk_ping, NULL);
+  tag = gtk_timeout_add(DeltaTime*1000, gtk_ping, NULL);
   gdk_input_add(net_waitfd(), GDK_INPUT_READ, gtk_net_data, NULL);
   gdk_input_add(dns_waitfd(), GDK_INPUT_READ, gtk_dns_data, NULL);
 
diff --git a/net.c b/net.c
index fb4d80dae192d49dfd6ca9ef1de9f1d04a88c95c..e1797f60a411150c368dccda4d60c378d9263fa3 100644 (file)
--- a/net.c
+++ b/net.c
@@ -136,7 +136,7 @@ void net_send_ping(int index) {
 
   ip->version = 0x45;
   ip->tos = 0;
-  ip->len = packetsize;
+  ip->len = htons (packetsize);
   ip->id = 0;
   ip->frag = 0;
   ip->ttl = 127;
@@ -178,7 +178,7 @@ void net_send_query(int hops) {
 
   ip->version = 0x45;
   ip->tos = 0;
-  ip->len = packetsize;
+  ip->len = htons (packetsize);
   ip->id = 0;
   ip->frag = 0;
   ip->ttl = hops;