diff options
Diffstat (limited to 'ace/UPIPE_Acceptor.cpp')
-rw-r--r-- | ace/UPIPE_Acceptor.cpp | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/ace/UPIPE_Acceptor.cpp b/ace/UPIPE_Acceptor.cpp index 46f932138ea..c102e6d089a 100644 --- a/ace/UPIPE_Acceptor.cpp +++ b/ace/UPIPE_Acceptor.cpp @@ -22,7 +22,7 @@ ACE_UPIPE_Acceptor::dump (void) const /* Do nothing routine for constructor. */ -ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor (void) +ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor (void) : mb_ (sizeof (ACE_UPIPE_Stream *)) { ACE_TRACE ("ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor"); @@ -36,7 +36,7 @@ ACE_UPIPE_Acceptor::~ACE_UPIPE_Acceptor (void) // General purpose routine for performing server ACE_UPIPE. int -ACE_UPIPE_Acceptor::open (const ACE_UPIPE_Addr &local_addr, +ACE_UPIPE_Acceptor::open (const ACE_UPIPE_Addr &local_addr, int reuse_addr) { ACE_TRACE ("ACE_UPIPE_Acceptor::open"); @@ -59,13 +59,15 @@ ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor (const ACE_UPIPE_Addr &local_addr, ACE_TRACE ("ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor"); if (this->open (local_addr, reuse_addr) == -1) - ACE_ERROR ( (LM_ERROR, "%p\n", "ACE_UPIPE_Acceptor")); + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("ACE_UPIPE_Acceptor"))); } int ACE_UPIPE_Acceptor::accept (ACE_UPIPE_Stream &new_stream, ACE_UPIPE_Addr *remote_addr, - ACE_Time_Value *timeout, + ACE_Time_Value *timeout, int restart, int reset_new_handle) { @@ -74,7 +76,7 @@ ACE_UPIPE_Acceptor::accept (ACE_UPIPE_Stream &new_stream, ACE_SPIPE_Stream new_io; - if (this->ACE_SPIPE_Acceptor::accept (new_io, remote_addr, + if (this->ACE_SPIPE_Acceptor::accept (new_io, remote_addr, timeout, restart) == -1) return -1; else @@ -83,32 +85,32 @@ ACE_UPIPE_Acceptor::accept (ACE_UPIPE_Stream &new_stream, ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, new_stream.lock_, -1)); - new_stream.set_handle (new_io.get_handle ()); - new_stream.reference_count_++; + new_stream.set_handle (new_io.get_handle ()); + new_stream.reference_count_++; // Transfer address ownership. new_io.get_local_addr (new_stream.local_addr_); new_io.get_remote_addr (new_stream.remote_addr_); - + // Now that we got the handle, we'll read the address of the // connector-side ACE_UPIPE_Stream out of the pipe and link that // ACE_UPIPE_Stream to our ACE_UPIPE_Stream. - if (ACE_OS::read (new_stream.get_handle (), + if (ACE_OS::read (new_stream.get_handle (), (char *) &remote_stream, sizeof remote_stream) == -1) - ACE_ERROR ((LM_ERROR, - "ACE_UPIPE_Acceptor: %p\n", - "read stream address failed")); + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("ACE_UPIPE_Acceptor: %p\n"), + ASYS_TEXT ("read stream address failed"))); else if (new_stream.stream_.link (remote_stream->stream_) == -1) - ACE_ERROR ((LM_ERROR, - "ACE_UPIPE_Acceptor: %p\n", - "link streams failed")); + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("ACE_UPIPE_Acceptor: %p\n"), + ASYS_TEXT ("link streams failed"))); // Send a message over the new streampipe to confirm acceptance. else if (new_stream.send (&mb_, 0) == -1) - ACE_ERROR ((LM_ERROR, - "ACE_UPIPE_Acceptor: %p\n", - "linked stream.put failed")); + ACE_ERROR ((LM_ERROR, + ASYS_TEXT ("ACE_UPIPE_Acceptor: %p\n"), + ASYS_TEXT ("linked stream.put failed"))); // Close down the new_stream at this point in order to conserve // handles. Note that we don't need the SPIPE connection @@ -119,9 +121,3 @@ ACE_UPIPE_Acceptor::accept (ACE_UPIPE_Stream &new_stream, } #endif /* ACE_HAS_THREADS */ - - - - - - |