[ofa-general] [PATCH] Fixed cio_close use when ENABLE_OSM_CONSOLE_SOCKET is not set

Nicolas Morey Chaisemartin nicolas.morey-chaisemartin at ext.bull.net
Mon Mar 9 03:30:36 PDT 2009


Fixes compilation problem introduced by 9b8561ac02e5e90c616b58bbbcfe2eb1a25d42fd
    opensm/console: Fixed osm_console poll to handle POLLHUP

Signed-off-by: Nicolas Morey-Chaisemartin <nicolas.morey-chaisemartin at ext.bull.net>
---
Sorry for that, I have build script which always compiles with --enable-socket so I missed this one.

 opensm/opensm/osm_console.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/opensm/opensm/osm_console.c b/opensm/opensm/osm_console.c
index 04c820c..0986fcc 100644
--- a/opensm/opensm/osm_console.c
+++ b/opensm/opensm/osm_console.c
@@ -1466,11 +1466,13 @@ int osm_console(osm_opensm_t * p_osm)
 	}
 	/* input fd is closed (hanged up) */
 	if (pollfd[1].revents & POLLHUP) {
+#ifdef ENABLE_OSM_CONSOLE_SOCKET
 		/* If we are using a sowket, we close the current connection */
 		if (p_oct->socket >= 0) {
 			cio_close(p_oct);
 			return 0;
 		}
+#endif
 		/* If we use a local console, stdin is closed (most probable is pipe ended)
 		 * so we close the local console */
 		return -1;
-- 
1.6.2-rc2.GIT




More information about the general mailing list