summaryrefslogtreecommitdiff
path: root/ACE/examples/Reactor
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2009-05-18 06:12:45 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2009-05-18 06:12:45 +0000
commit9c33ffa62333c16570090d68ba46823bddc57d5e (patch)
treedb2e25e5e2789c5274b20d71f60a9775a9914b80 /ACE/examples/Reactor
parent96393358fb7e0981c0dfeefbca48282d4a874ce4 (diff)
downloadATCD-9c33ffa62333c16570090d68ba46823bddc57d5e.tar.gz
Mon May 18 06:12:05 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* examples/Reactor/TP_Reactor/AcceptHandler.cpp: * examples/Reactor/TP_Reactor/server.cpp: Use ACE_ERRNO_GET
Diffstat (limited to 'ACE/examples/Reactor')
-rw-r--r--ACE/examples/Reactor/TP_Reactor/AcceptHandler.cpp8
-rw-r--r--ACE/examples/Reactor/TP_Reactor/server.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/ACE/examples/Reactor/TP_Reactor/AcceptHandler.cpp b/ACE/examples/Reactor/TP_Reactor/AcceptHandler.cpp
index 00b06a2286a..40bda74f4da 100644
--- a/ACE/examples/Reactor/TP_Reactor/AcceptHandler.cpp
+++ b/ACE/examples/Reactor/TP_Reactor/AcceptHandler.cpp
@@ -69,7 +69,7 @@ int AcceptHandler::handle_input(ACE_HANDLE) {
ACE_NEW_NORETURN (reader, ReadHandler());
if (reader == 0)
ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("%N:%l: Failed to allocate ")
- ACE_TEXT ("reader. (errno = %i: %m)\n"), errno), -1);
+ ACE_TEXT ("reader. (errno = %i: %m)\n"), ACE_ERRNO_GET), -1);
// put reader in an auto pointer so we can use ACE_ERROR_RETURN safely
auto_ptr<ReadHandler> pReader(reader);
@@ -77,13 +77,13 @@ int AcceptHandler::handle_input(ACE_HANDLE) {
// accept the connection using the reader's stream
if (mAcceptor.accept(reader->getStream(), &clientAddr) == -1)
ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("%N:%l: Failed to accept ")
- ACE_TEXT ("client connection. (errno = %i: %m)\n"), errno), -1);
+ ACE_TEXT ("client connection. (errno = %i: %m)\n"), ACE_ERRNO_GET), -1);
// register the reader with the reactor
if (mReactor->register_handler(reader,
ACE_Event_Handler::READ_MASK) == -1)
ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("%N:%l: Failed to register ")
- ACE_TEXT ("read handler. (errno = %i: %m)\n"), errno), -1);
+ ACE_TEXT ("read handler. (errno = %i: %m)\n"), ACE_ERRNO_GET), -1);
// from now on the read handler takes care of itself
pReader.release();
@@ -97,7 +97,7 @@ int AcceptHandler::handle_close(ACE_HANDLE, ACE_Reactor_Mask) {
// close the listening socket
if (mAcceptor.close() == -1)
ACE_ERROR((LM_ERROR, ACE_TEXT("%N:%l: Failed to close the ")
- ACE_TEXT ("socket. (errno = %i: %m)\n"), errno));
+ ACE_TEXT ("socket. (errno = %i: %m)\n"), ACE_ERRNO_GET));
// no need to distinguish between error during close and normal close
// since ACE does not evaluate the return value of handle_close()
diff --git a/ACE/examples/Reactor/TP_Reactor/server.cpp b/ACE/examples/Reactor/TP_Reactor/server.cpp
index 0c147818424..d80b1a32a14 100644
--- a/ACE/examples/Reactor/TP_Reactor/server.cpp
+++ b/ACE/examples/Reactor/TP_Reactor/server.cpp
@@ -45,7 +45,7 @@ int ACE_TMAIN(int, ACE_TCHAR **) {
ACE_NEW_NORETURN (acceptHandler, AcceptHandler(&reactor));
if (acceptHandler == 0)
ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("%N:%l: Failed to allocate ")
- ACE_TEXT ("accept handler. (errno = %i: %m)\n"), errno), -1);
+ ACE_TEXT ("accept handler. (errno = %i: %m)\n"), ACE_ERRNO_GET), -1);
// open the accept handler
if (acceptHandler->open() == -1) {