diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-12-16 15:41:12 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-12-16 15:41:12 +0000 |
commit | 9ab4bb4925f884f2897380be3e71989043c29128 (patch) | |
tree | 29bda70a246543ca81b283fe7f70382e4aa355a3 /ACE/performance-tests | |
parent | 6ffceaf0fe92aaaadfe784a5b18afbec333af09a (diff) | |
download | ATCD-9ab4bb4925f884f2897380be3e71989043c29128.tar.gz |
Tue Dec 16 15:40:00 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/performance-tests')
-rw-r--r-- | ACE/performance-tests/TCP/tcp_test.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/ACE/performance-tests/TCP/tcp_test.cpp b/ACE/performance-tests/TCP/tcp_test.cpp index 74cda3e7eec..3aceb05b449 100644 --- a/ACE/performance-tests/TCP/tcp_test.cpp +++ b/ACE/performance-tests/TCP/tcp_test.cpp @@ -340,7 +340,7 @@ Server::Server (const ACE_INET_Addr &addr) "ACE_Reactor::register_handler: Server\n")); } -#if !defined (ACE_LACKS_SOCKET_BUFSIZ) +#if !defined (ACE_LACKS_SO_SNDBUF) if (so_bufsz != 0) { if (this->endpoint_.set_option (SOL_SOCKET, @@ -348,17 +348,26 @@ Server::Server (const ACE_INET_Addr &addr) (void *) &so_bufsz, sizeof (so_bufsz)) == -1 && errno != ENOTSUP) - ACE_ERROR ((LM_ERROR, "Server::Server: SO_SNDBUF %p\n", - "set_option failed")); - else if (this->endpoint_.set_option (SOL_SOCKET, - SO_RCVBUF, - (void *) &so_bufsz, - sizeof (so_bufsz)) == -1 + { + ACE_ERROR ((LM_ERROR, "Server::Server: SO_SNDBUF %p\n", + "set_option failed")); + } + } +#endif /* ACE_LACKS_SO_SNDBUF */ +#if !defined (ACE_LACKS_SO_RCVBUF) + if (so_bufsz != 0) + { + if (this->endpoint_.set_option (SOL_SOCKET, + SO_RCVBUF, + (void *) &so_bufsz, + sizeof (so_bufsz)) == -1 && errno != ENOTSUP) - ACE_ERROR ((LM_ERROR, "Server::Server: SO_RCVBUF %p\n", - "set_option failed")); + { + ACE_ERROR ((LM_ERROR, "Server::Server: SO_RCVBUF %p\n", + "set_option failed")); + } } -#endif /* !ACE_LACKS_SOCKET_BUFSIZ */ +#endif /* !ACE_LACKS_SO_RCVBUF */ if (acceptor.close () == -1) ACE_ERROR ((LM_ERROR, "Server::Server %p\n", "close failed")); |