diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-17 03:57:15 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-17 03:57:15 +0000 |
commit | 046514566874b328619872b148882c8ae06ea229 (patch) | |
tree | 691b2b6eb6166bb1ca9d40999478109dc881e87b | |
parent | 1ef6eb5d2a099d2e5bcbd60afe2a62e7a94661b4 (diff) | |
download | ATCD-046514566874b328619872b148882c8ae06ea229.tar.gz |
ChangeLogTag:Wed Sep 16 22:52:44 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | ChangeLog-98b | 7 | ||||
-rw-r--r-- | examples/Reactor/Multicast/Log_Wrapper.cpp | 12 | ||||
-rw-r--r-- | examples/Reactor/Multicast/server.cpp | 10 | ||||
-rw-r--r-- | examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp | 10 |
4 files changed, 22 insertions, 17 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b index 692e74ac44c..4c72e19822d 100644 --- a/ChangeLog-98b +++ b/ChangeLog-98b @@ -1,3 +1,10 @@ +Wed Sep 16 22:52:44 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * examples/Reactor/Multicast/server.cpp: + * examples/Reactor/Multicast/Log_Wrapper.cpp: + * examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp: + Use ACE_IO_Vector instead of iovec because it is more portable. + Wed Sep 16 22:17:54 1998 Carlos O'Ryan <coryan@cs.wustl.edu> * ace/OS.h: diff --git a/examples/Reactor/Multicast/Log_Wrapper.cpp b/examples/Reactor/Multicast/Log_Wrapper.cpp index bf78aaadd6a..e871872f26f 100644 --- a/examples/Reactor/Multicast/Log_Wrapper.cpp +++ b/examples/Reactor/Multicast/Log_Wrapper.cpp @@ -58,16 +58,14 @@ Log_Wrapper::log_message (ACE_Log_Priority type, char *message) this->log_msg_.msg_length = strlen(message)+1; this->log_msg_.sequence_number = htonl(sequence_number_); - iovec *iovp = new iovec[2]; - iovp[0].iov_base = (char *) &log_msg_; - iovp[0].iov_len = sizeof log_msg_; - iovp[1].iov_base = message; - iovp[1].iov_len = log_msg_.msg_length; + ACE_IO_Vector iovp[2]; + iovp[0].buffer ( &log_msg_); + iovp[0].length (sizeof log_msg_); + iovp[1].buffer (message); + iovp[1].length (log_msg_.msg_length); logger_.send (iovp, 2); - delete iovp; - // success. return 0; } diff --git a/examples/Reactor/Multicast/server.cpp b/examples/Reactor/Multicast/server.cpp index bff975c74ed..39a97aaac30 100644 --- a/examples/Reactor/Multicast/server.cpp +++ b/examples/Reactor/Multicast/server.cpp @@ -144,11 +144,11 @@ int Server_Events::handle_input (ACE_HANDLE) { // Receive message from multicast group. - iovec iovp[2]; - iovp[0].iov_base = buf_; - iovp[0].iov_len = sizeof log_record_; - iovp[1].iov_base = &buf_[sizeof (log_record_)]; - iovp[1].iov_len = 4 * BUFSIZ - sizeof log_record_; + ACE_IO_Vector iovp[2]; + iovp[0].buffer (buf_); + iovp[0].length (sizeof log_record_); + iovp[1].buffer (&buf_[sizeof (log_record_)]); + iovp[1].length (4 * BUFSIZ - sizeof log_record_); ssize_t retcode = this->mcast_dgram_.recv (iovp, 2, this->remote_addr_); diff --git a/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp index 8a7b2be7fcd..4d99b809c1f 100644 --- a/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp +++ b/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp @@ -68,12 +68,12 @@ main (int argc, char *argv[]) /* First send the name of the file as a datagram. */ - iovec iov[2]; + ACE_IO_Vector iov[2]; - iov[0].iov_base = "filename: "; - iov[0].iov_len = 11; - iov[1].iov_base = file_name; - iov[1].iov_len = ACE_OS::strlen (file_name); + iov[0].buffer ("filename: "); + iov[0].length (11); + iov[1].buffer (file_name); + iov[1].length (ACE_OS::strlen (file_name)); if (dc.send (iov, 2) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), -1); |