From 2b26aba30ce6ac715e493373a840f6e9a9f2b89c Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 6 Aug 2008 08:50:20 +0000 Subject: Wed Aug 6 08:49:11 UTC 2008 Johnny Willemsen --- .../Connection/blocking/SPIPE-connector.cpp | 36 ++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'ACE/examples/Connection') diff --git a/ACE/examples/Connection/blocking/SPIPE-connector.cpp b/ACE/examples/Connection/blocking/SPIPE-connector.cpp index 7ffbffb408e..caa99901aac 100644 --- a/ACE/examples/Connection/blocking/SPIPE-connector.cpp +++ b/ACE/examples/Connection/blocking/SPIPE-connector.cpp @@ -75,22 +75,26 @@ Peer_Handler::handle_input (ACE_HANDLE) sizeof buf); if (n > 0) - if (this->peer ().send (buf, n) != n) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("write failed")), - -1); - else if (n == 0) // Explicitly close the connection. - { - if (this->peer ().close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("close")), - 1); - return -1; - } - else - this->display_menu (); + { + if (this->peer ().send (buf, n) != n) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("write failed")), + -1); + else if (n == 0) // Explicitly close the connection. + { + if (this->peer ().close () == -1) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("close")), + 1); + return -1; + } + else + { + this->display_menu (); + } + } return 0; } -- cgit v1.2.1