summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-01-29 09:07:56 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-01-29 09:07:56 +0000
commit0254fbaaa4706a36fee8615d2067dadd397b40bb (patch)
treeba14ae097a70b639bd49df17d6709988c0bc9a49
parentcaa841fcc9bd8e1a8cd63539681aa898ffd5aefd (diff)
downloadATCD-0254fbaaa4706a36fee8615d2067dadd397b40bb.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/SHMIOP_Acceptor.cpp10
-rw-r--r--TAO/tao/SHMIOP_Connect.cpp4
-rw-r--r--TAO/tao/SHMIOP_Transport.cpp1
-rw-r--r--ace/MEM_IO.h2
-rw-r--r--ace/MEM_IO.i54
5 files changed, 36 insertions, 35 deletions
diff --git a/TAO/tao/SHMIOP_Acceptor.cpp b/TAO/tao/SHMIOP_Acceptor.cpp
index 1aadfa8a2d9..3403a2a4876 100644
--- a/TAO/tao/SHMIOP_Acceptor.cpp
+++ b/TAO/tao/SHMIOP_Acceptor.cpp
@@ -338,7 +338,7 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str)
if (end == begin)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("TAO (%P|%t) Zero length IIOP option.\n")),
+ ASYS_TEXT ("TAO (%P|%t) Zero length SHMIOP option.\n")),
-1);
else if (end != ACE_CString::npos)
{
@@ -349,7 +349,7 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str)
if (slot == ACE_static_cast (int, len - 1)
|| slot == ACE_CString::npos)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("TAO (%P|%t) IIOP option <%s> is ")
+ ASYS_TEXT ("TAO (%P|%t) SHMIOP option <%s> is ")
ASYS_TEXT ("missing a value.\n"),
opt.c_str ()),
-1);
@@ -359,7 +359,7 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str)
if (name.length () == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("TAO (%P|%t) Zero length IIOP ")
+ ASYS_TEXT ("TAO (%P|%t) Zero length SHMIOP ")
ASYS_TEXT ("option name.\n")),
-1);
@@ -377,14 +377,14 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str)
this->priority_ = corba_priority;
else
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("TAO (%P|%t) Invalid IIOP endpoint ")
+ ASYS_TEXT ("TAO (%P|%t) Invalid SHMIOP endpoint ")
ASYS_TEXT ("priority: <%s>\n"),
value.c_str ()),
-1);
}
else
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("TAO (%P|%t) Invalid IIOP option: <%s>\n"),
+ ASYS_TEXT ("TAO (%P|%t) Invalid SHMIOP option: <%s>\n"),
name.c_str ()),
-1);
}
diff --git a/TAO/tao/SHMIOP_Connect.cpp b/TAO/tao/SHMIOP_Connect.cpp
index e401d167ba6..8b1e0d4ffa0 100644
--- a/TAO/tao/SHMIOP_Connect.cpp
+++ b/TAO/tao/SHMIOP_Connect.cpp
@@ -145,7 +145,7 @@ TAO_SHMIOP_Server_Connection_Handler::open (void*)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("TAO (%P|%t) IIOP connection from client <%s> on %d\n"),
+ ASYS_TEXT ("TAO (%P|%t) SHMIOP connection from client <%s> on %d\n"),
client, this->peer ().get_handle ()));
return 0;
@@ -398,7 +398,7 @@ TAO_SHMIOP_Client_Connection_Handler::open (void *)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("TAO (%P|%t) IIOP connection to server <%s> on %d\n"),
+ ASYS_TEXT ("TAO (%P|%t) SHMIOP connection to server <%s> on %d\n"),
server, this->peer ().get_handle ()));
// Register the handler with the Reactor if necessary.
diff --git a/TAO/tao/SHMIOP_Transport.cpp b/TAO/tao/SHMIOP_Transport.cpp
index 11e4ed7da6c..54ede227db5 100644
--- a/TAO/tao/SHMIOP_Transport.cpp
+++ b/TAO/tao/SHMIOP_Transport.cpp
@@ -354,6 +354,7 @@ TAO_SHMIOP_Transport::send (const ACE_Message_Block *message_block,
return n;
}
+ nbytes += n;
if (message_block->cont ())
message_block = message_block->cont ();
else
diff --git a/ace/MEM_IO.h b/ace/MEM_IO.h
index af99ea3f2fd..754490c2967 100644
--- a/ace/MEM_IO.h
+++ b/ace/MEM_IO.h
@@ -59,7 +59,7 @@ public:
size_t n) ;
// Recv an <n> byte buffer from the shm_malloc_ thru connected socket.
- ssize_t fetch_recv_buf (int flags, ACE_Time_Value *timeout = 0);
+ ssize_t fetch_recv_buf (int flags, const ACE_Time_Value *timeout = 0);
// @@ Please fill in here.
/*
diff --git a/ace/MEM_IO.i b/ace/MEM_IO.i
index 54ef8803561..ec3fc4d7fad 100644
--- a/ace/MEM_IO.i
+++ b/ace/MEM_IO.i
@@ -32,30 +32,7 @@ ASYS_INLINE ssize_t
ACE_MEM_IO::recv (void *buf, size_t n, int flags)
{
ACE_TRACE ("ACE_MEM_IO::recv");
-
- size_t count = 0;
-
-// while (n > 0)
-// {
- size_t buf_len = this->buf_size_ - this->cur_offset_;
- if (buf_len == 0)
- {
- if (this->fetch_recv_buf (flags) == -1)
- return -1;
- buf_len = this->buf_size_;
- }
-
- size_t length = (n > buf_len ? buf_len : n);
-
- ACE_OS::memcpy ((char *) buf + count,
- (char *) this->recv_buffer_ + this->cur_offset_,
- length);
- this->cur_offset_ += length;
-// n -= length;
-// count += length;
-// }
-
- return count;
+ return this->recv (buf, n, flags, 0);
}
// Send an n byte message to the connected socket.
@@ -78,7 +55,7 @@ ACE_MEM_IO::recv (void *buf, size_t n)
}
ASYS_INLINE ssize_t
-ACE_MEM_IO::fetch_recv_buf (int flag, ACE_Time_Value *timeout)
+ACE_MEM_IO::fetch_recv_buf (int flag, const ACE_Time_Value *timeout)
{
ACE_TRACE ("ACE_MEM_IO::fetch_recv_buf");
@@ -190,7 +167,7 @@ ACE_MEM_IO::recv (void *buf,
const ACE_Time_Value *timeout)
{
ACE_TRACE ("ACE_MEM_IO::recv");
- return ACE::recv (this->get_handle (), buf, len, timeout);
+ return this->recv (buf, len, 0, timeout);
}
ASYS_INLINE ssize_t
@@ -209,5 +186,28 @@ ACE_MEM_IO::recv (void *buf,
const ACE_Time_Value *timeout)
{
ACE_TRACE ("ACE_MEM_IO::recv");
- return ACE::recv (this->get_handle (), buf, len, flags, timeout);
+
+ size_t count = 0;
+
+// while (len > 0)
+// {
+ size_t buf_len = this->buf_size_ - this->cur_offset_;
+ if (buf_len == 0)
+ {
+ if (this->fetch_recv_buf (flags, timeout) == -1)
+ return -1;
+ buf_len = this->buf_size_;
+ }
+
+ size_t length = (len > buf_len ? buf_len : len);
+
+ ACE_OS::memcpy ((char *) buf + count,
+ (char *) this->recv_buffer_ + this->cur_offset_,
+ length);
+ this->cur_offset_ += length;
+// len -= length;
+ count += length;
+// }
+
+ return count;
}