From 2b48a7daea8d6c57a443e764913ef888e386bbd1 Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Sat, 1 Nov 2008 18:59:14 +0100 Subject: [PATCH] in loop message show inactive fds as -1 --- xioengine.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xioengine.c b/xioengine.c index 60e8fc3..e967197 100644 --- a/xioengine.c +++ b/xioengine.c @@ -127,8 +127,10 @@ int _socat(xiofile_t *xfd1, xiofile_t *xfd2) { total_timeout = xioparams->total_timeout; Notice4("starting data transfer loop with FDs [%d,%d] and [%d,%d]", - XIO_GETRDFD(sock1), XIO_GETWRFD(sock1), - XIO_GETRDFD(sock2), XIO_GETWRFD(sock2)); + XIO_READABLE(sock1)?XIO_GETRDFD(sock1):-1, + XIO_WRITABLE(sock1)?XIO_GETWRFD(sock1):-1, + XIO_READABLE(sock2)?XIO_GETRDFD(sock2):-1, + XIO_WRITABLE(sock2)?XIO_GETWRFD(sock2):-1); while (XIO_RDSTREAM(sock1)->eof <= 1 || XIO_RDSTREAM(sock2)->eof <= 1) { struct timeval timeout, *to = NULL;