summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Transport.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-05-26 11:45:34 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-05-26 11:45:34 +0000
commit68883f19ea1a27e26f9145f5068eb6ae08c483b6 (patch)
treef3267990fe0b75d92b7e4c2391fc2e9c2d8a1c71 /TAO/tao/IIOP_Transport.cpp
parent9bcf81dfac8e418b52a487db521f92ea7f097676 (diff)
downloadATCD-68883f19ea1a27e26f9145f5068eb6ae08c483b6.tar.gz
Tue May 26 11:25:03 UTC 2009 Carlos O'Ryan <coryan@glamdring>
Diffstat (limited to 'TAO/tao/IIOP_Transport.cpp')
-rw-r--r--TAO/tao/IIOP_Transport.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index f52e3f40ab2..8d6a0d4854b 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -88,7 +88,7 @@ TAO_IIOP_Transport::sendfile (TAO_MMAP_Allocator * allocator,
iovec * iov,
int iovcnt,
size_t &bytes_transferred,
- ACE_Time_Value const * timeout)
+ TAO::Transport::Drain_Constraints const & dc)
{
// @@ We should probably set the TCP_CORK socket option to minimize
// network operations. It may also be useful to adjust the
@@ -97,7 +97,7 @@ TAO_IIOP_Transport::sendfile (TAO_MMAP_Allocator * allocator,
// If we don't have an allocator, fallback to the regular way of sending
// data
if (allocator == 0)
- return this->send (iov, iovcnt, bytes_transferred, timeout);
+ return this->send (iov, iovcnt, bytes_transferred, this->io_timeout(dc));
// We can only use sendfile when all data is coming from the mmap allocator,
// if not, we just fallback to to the regular way of sending data
@@ -106,7 +106,8 @@ TAO_IIOP_Transport::sendfile (TAO_MMAP_Allocator * allocator,
for (iovec * index = off_check_begin; index != off_check_end; ++index)
{
if (-1 == allocator->offset (index->iov_base))
- return this->send (iov, iovcnt, bytes_transferred, timeout);
+ return this->send (iov, iovcnt, bytes_transferred,
+ this->io_timeout(dc));
}
ssize_t retval = -1;
@@ -125,17 +126,17 @@ TAO_IIOP_Transport::sendfile (TAO_MMAP_Allocator * allocator,
{
off_t offset = allocator->offset (i->iov_base);
- if (timeout)
+ if (this->io_timeout(dc))
{
int val = 0;
- if (ACE::enter_send_timedwait (out_fd, timeout, val) == -1)
+ if (ACE::enter_send_timedwait (out_fd,
+ this->io_timeout(dc), val) == -1)
return retval;
else
{
retval =
ACE_OS::sendfile (out_fd, in_fd, &offset, i->iov_len);
ACE::restore_non_blocking_mode (out_fd, val);
-
}
}
else