[rwho] applied patch from Ian Donaldson to transmit status reliably (bug #708385)

Jan Horak hhorak at fedoraproject.org
Thu Jun 2 09:53:53 UTC 2011


commit b8f0f74e719ff8a19e127400fb7b5849ebd56353
Author: Honza Horák <hhorak at redhat.com>
Date:   Thu Jun 2 11:53:02 2011 +0200

    applied patch from Ian Donaldson to transmit status reliably
    (bug #708385)

 netkit-rwho-0.17-neighbours.patch |   33 +++++++++++++++++++++++++++++++++
 rwho.spec                         |    8 +++++++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/netkit-rwho-0.17-neighbours.patch b/netkit-rwho-0.17-neighbours.patch
new file mode 100644
index 0000000..3eab135
--- /dev/null
+++ b/netkit-rwho-0.17-neighbours.patch
@@ -0,0 +1,33 @@
+diff -up netkit-rwho-0.17/rwhod/rwhod.c.neighbours netkit-rwho-0.17/rwhod/rwhod.c
+--- netkit-rwho-0.17/rwhod/rwhod.c.neighbours	2011-06-01 18:26:01.913226552 +0200
++++ netkit-rwho-0.17/rwhod/rwhod.c	2011-06-01 18:28:44.434226510 +0200
+@@ -383,6 +383,8 @@ broadcaster()
+ 	getboottime(&mywd);
+ 
+ 	while (1) {
++		if (!configure(sk))
++			exit(1);
+ 		sendpacket(&mywd);
+ 		(void) sleep(AL_INTERVAL);
+ 	}
+@@ -603,6 +605,20 @@ configure(int s)
+ 	struct sockaddr_in *sn;
+ 	register struct neighbor *np;
+ 
++	/* forget previous neighbors; interfaces may have changed */
++	for (np = neighbors; np != NULL; ) {
++		register struct neighbor *pp;
++ 
++		if(np->n_name)
++			free(np->n_name);
++		if(np->n_addr)
++			free(np->n_addr);
++		pp = np;
++		np = np->n_next;
++		free((char *)pp);
++	}
++	neighbors = 0;
++
+ 	ifc.ifc_len = sizeof (buf);
+ 	ifc.ifc_buf = (char *)buf;
+ 	if (ioctl(s, SIOCGIFCONF, &ifc) < 0) {
diff --git a/rwho.spec b/rwho.spec
index 9bef9b6..9fe4701 100644
--- a/rwho.spec
+++ b/rwho.spec
@@ -1,7 +1,7 @@
 Summary: Displays who is logged in to local network machines
 Name: rwho
 Version: 0.17
-Release: 34%{?dist}
+Release: 35%{?dist}
 License: BSD
 Group: System Environment/Daemons
 Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-rwho-%{version}.tar.gz
@@ -16,6 +16,7 @@ Patch6: netkit-rwho-0.17-wd_we.patch
 Patch7: netkit-rwho-0.17-time.patch
 Patch8: netkit-rwho-0.17-gcc4.patch
 Patch9: netkit-rwho-0.17-waitchild.patch
+Patch10: netkit-rwho-0.17-neighbours.patch
 Requires: /sbin/chkconfig /etc/init.d
 BuildRoot: %{_tmppath}/%{name}-root
 
@@ -39,6 +40,7 @@ are logged in to your local network.
 %patch7 -p1 -b .time
 %patch8 -p1 -b .gcc4
 %patch9 -p1 -b .waitchild
+%patch10 -p1 -b .neighbours
 
 %build
 sh configure --with-c-compiler=gcc
@@ -101,6 +103,10 @@ fi
 %{_initrddir}/rwhod
 
 %changelog
+* Thu Jun 02 2011 Honza Horak <hhorak at redhat.com> - 0.17-35
+- applied patch from Ian Donaldson to transmit status reliably
+  (bug #708385)
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.17-34
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


More information about the scm-commits mailing list