From 86663e01be19f64adf3e8dd8c03f217c5305fef5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 30 Aug 2012 17:01:47 -0500 Subject: Also check to ensure we wrote an identical number of bytes in and out. Idea by Albert --- socket-sucker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socket-sucker.c b/socket-sucker.c index 35424a6..8e8ad25 100644 --- a/socket-sucker.c +++ b/socket-sucker.c @@ -69,7 +69,7 @@ main (int argc, char * argv[]) close(socket_fd); - if (in > 0 && out > 0) { + if (in > 0 && out > 0 && in == out) { return 0; } else { return -1; -- cgit v1.2.3