summaryrefslogtreecommitdiff
path: root/ACE/examples/Connection
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-08-06 08:50:20 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-08-06 08:50:20 +0000
commit2b26aba30ce6ac715e493373a840f6e9a9f2b89c (patch)
tree57d98a6bca136ed005456c4a502d533440a9d241 /ACE/examples/Connection
parentd725a40290b71816b5bb243cfa92cffd94940290 (diff)
downloadATCD-2b26aba30ce6ac715e493373a840f6e9a9f2b89c.tar.gz
Wed Aug 6 08:49:11 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/examples/Connection')
-rw-r--r--ACE/examples/Connection/blocking/SPIPE-connector.cpp36
1 files changed, 20 insertions, 16 deletions
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;
}