diff options
Diffstat (limited to 'ACE/examples/C++NPv2/Service_Reporter.cpp')
-rw-r--r-- | ACE/examples/C++NPv2/Service_Reporter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ACE/examples/C++NPv2/Service_Reporter.cpp b/ACE/examples/C++NPv2/Service_Reporter.cpp index 0244d2ca573..797ef8989fd 100644 --- a/ACE/examples/C++NPv2/Service_Reporter.cpp +++ b/ACE/examples/C++NPv2/Service_Reporter.cpp @@ -51,23 +51,23 @@ int Service_Reporter::handle_input (ACE_HANDLE) { iterator.advance ()) { iovec iov[3]; iov[0].iov_base = const_cast<ACE_TCHAR *> (st->name ()); - + iov[0].iov_len = ACE_Utils::truncate_cast<u_long> ( ACE_OS::strlen (st->name ()) * sizeof (ACE_TCHAR)); - + const ACE_TCHAR *state = st->active () ? ACE_TEXT (" (active) ") : ACE_TEXT (" (paused) "); iov[1].iov_base = const_cast<ACE_TCHAR *> (state); - + iov[1].iov_len = ACE_Utils::truncate_cast<u_long> ( ACE_OS::strlen (state) * sizeof (ACE_TCHAR)); - + ACE_TCHAR *report = 0; // Ask info() to allocate buffer int len = st->type ()->info (&report, 0); iov[2].iov_base = static_cast<ACE_TCHAR *> (report); - + iov[2].iov_len = static_cast<u_long> (len); iov[2].iov_len *= sizeof (ACE_TCHAR); peer_stream.sendv_n (iov, 3); @@ -93,7 +93,7 @@ int Service_Reporter::info (ACE_TCHAR **bufferp, *bufferp = ACE::strnew (buf); else ACE_OS::strncpy (*bufferp, buf, length); - + return ACE_Utils::truncate_cast<int> (ACE_OS::strlen (*bufferp)); } |