summaryrefslogtreecommitdiff
path: root/TAO/tao/HTTP_Handler.cpp
diff options
context:
space:
mode:
authorhuangh <huangh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-04-11 18:07:48 +0000
committerhuangh <huangh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-04-11 18:07:48 +0000
commitb73cdef9288bfcb88b45c1d320d377b03007d1b3 (patch)
tree991b03a4a95b1ed7c995b43398f71b7a7cd2c2f7 /TAO/tao/HTTP_Handler.cpp
parent5be31b75376b2a62e9dbb60b2c179bea44f5e10e (diff)
downloadATCD-b73cdef9288bfcb88b45c1d320d377b03007d1b3.tar.gz
Thu Apr 11 18:03:24 UTC 2013 Huang-Ming Huang <huangh@ociweb.com>
Diffstat (limited to 'TAO/tao/HTTP_Handler.cpp')
-rw-r--r--TAO/tao/HTTP_Handler.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/TAO/tao/HTTP_Handler.cpp b/TAO/tao/HTTP_Handler.cpp
index fab1fe5d253..7326bccad4c 100644
--- a/TAO/tao/HTTP_Handler.cpp
+++ b/TAO/tao/HTTP_Handler.cpp
@@ -7,6 +7,7 @@
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_strings.h"
+#include "tao/debug.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -35,10 +36,10 @@ int
TAO_HTTP_Handler::open (void *)
{
if (this->send_request () != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) - HTTP_Handler::open, send_request failed\n"), -1);
+ TAOLIB_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) - HTTP_Handler::open, send_request failed\n"), -1);
if (this->receive_reply () != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) - HTTP_Handler::open, receive_reply failed\n"), -1);
+ TAOLIB_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) - HTTP_Handler::open, receive_reply failed\n"), -1);
return 0;
}
@@ -88,7 +89,7 @@ TAO_HTTP_Reader::send_request (void)
if (MAX_HEADER_SIZE < (ACE_OS::strlen (request_prefix_)
+ ACE_OS::strlen (filename_)
+ ACE_OS::strlen (request_suffix_) + 4))
- ACE_ERROR_RETURN((LM_ERROR,"TAO (%P|%t) - HTTP_Reader::send_request, request too large!"), -1);
+ TAOLIB_ERROR_RETURN((LM_ERROR,"TAO (%P|%t) - HTTP_Reader::send_request, request too large!"), -1);
// Create a message to send to the server requesting retrieval of the file
int const len = ACE_OS::sprintf (mesg, "%s %s %s", request_prefix_,
@@ -97,7 +98,7 @@ TAO_HTTP_Reader::send_request (void)
// Send the message to server
if (peer ().send_n (mesg, len) != len)
- ACE_ERROR_RETURN((LM_ERROR,"TAO (%P|%t) - HTTP_Reader::send_request, error sending request\n"), -1);
+ TAOLIB_ERROR_RETURN((LM_ERROR,"TAO (%P|%t) - HTTP_Reader::send_request, error sending request\n"), -1);
return 0;
}
@@ -116,7 +117,7 @@ TAO_HTTP_Reader::receive_reply (void)
{
//Make sure that response type is 200 OK
if (ACE_OS::strstr (buf,"200 OK") == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
+ TAOLIB_ERROR_RETURN ((LM_ERROR,
"TAO (%P|%t) - HTTP_Reader::receive_reply, Response is not 200 OK\n" ), -1);
// Search for the header termination string "\r\n\r\n", or "\n\n". If
@@ -135,7 +136,7 @@ TAO_HTTP_Reader::receive_reply (void)
}
else
{
- ACE_ERROR_RETURN ((LM_ERROR,
+ TAOLIB_ERROR_RETURN ((LM_ERROR,
"TAO (%P|%t) - HTTP_Reader::receive_reply, error while reading header\n"), -1);
}
@@ -155,7 +156,7 @@ TAO_HTTP_Reader::receive_reply (void)
// Copy over all the data bytes into our message buffer.
if (curr->copy (buf_ptr, bytes_read) == -1)
{
- ACE_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) - HTTP_Reader::receive_reply, error copying data into Message_Block\n"), -1);
+ TAOLIB_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) - HTTP_Reader::receive_reply, error copying data into Message_Block\n"), -1);
}
// read the rest of the data into a number of ACE_Message_Blocks and
@@ -184,7 +185,7 @@ TAO_HTTP_Reader::receive_reply (void)
}
else
{
- ACE_ERROR_RETURN ((LM_ERROR,
+ TAOLIB_ERROR_RETURN ((LM_ERROR,
"TAO (%P|%t) - HTTP_Reader::receive_reply, Error while reading header\n"), -1);
}
} while (num_recvd != 0);