From 2bb1a3a5ea92c70b572f35d9b99c8580272e4be8 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Tue, 28 Dec 2004 02:42:23 +0000 Subject: FreeBSD sets POLLIN along with POLLHUP when a pipe is reaches EOF. Account for this to avoid an infinite loop when running the embedded network commands. --- net/gnome-nettool/files/patch-src_nettool.c | 33 +++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'net/gnome-nettool/files/patch-src_nettool.c') diff --git a/net/gnome-nettool/files/patch-src_nettool.c b/net/gnome-nettool/files/patch-src_nettool.c index 3319e36a70ae..51f11e3f1e96 100644 --- a/net/gnome-nettool/files/patch-src_nettool.c +++ b/net/gnome-nettool/files/patch-src_nettool.c @@ -1,5 +1,5 @@ ---- src/nettool.c.orig Sun Jul 4 15:52:03 2004 -+++ src/nettool.c Sun Jul 4 15:53:11 2004 +--- src/nettool.c.orig Wed Dec 22 07:07:36 2004 ++++ src/nettool.c Mon Dec 27 21:22:28 2004 @@ -21,6 +21,7 @@ #include #include @@ -8,3 +8,32 @@ #include #include #include +@@ -361,6 +362,10 @@ + len, NULL); + } + ++ g_free (text); ++ ++ return TRUE; ++ + } else if (status == G_IO_STATUS_AGAIN) { + char buf[1]; + +@@ -372,12 +377,14 @@ + } + g_string_append_c (netinfo->command_output, buf[0]); + } ++ ++ g_free (text); ++ ++ return TRUE; + } else if (status == G_IO_STATUS_EOF) { +- } ++ } + + g_free (text); +- +- return TRUE; + } + + /* The condition is not G_IO_HUP | G_IO_ERR | G_IO_NVAL, so -- cgit v1.2.3