|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85740 - trunk/boost/asio/detail/impl
From: chris_at_[hidden]
Date: 2013-09-17 17:38:41
Author: chris_kohlhoff
Date: 2013-09-17 17:38:41 EDT (Tue, 17 Sep 2013)
New Revision: 85740
URL: http://svn.boost.org/trac/boost/changeset/85740
Log:
Fix nfds argument to select.
Text files modified:
trunk/boost/asio/detail/impl/socket_ops.ipp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Modified: trunk/boost/asio/detail/impl/socket_ops.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/socket_ops.ipp Tue Sep 17 17:36:54 2013 (r85739)
+++ trunk/boost/asio/detail/impl/socket_ops.ipp 2013-09-17 17:38:41 EDT (Tue, 17 Sep 2013) (r85740)
@@ -1752,7 +1752,7 @@
zero_timeout.tv_usec = 0;
timeval* timeout = (state & user_set_non_blocking) ? &zero_timeout : 0;
clear_last_error();
- int result = error_wrapper(::select(s, &fds, 0, 0, timeout), ec);
+ int result = error_wrapper(::select(s + 1, &fds, 0, 0, timeout), ec);
#else // defined(BOOST_ASIO_WINDOWS)
// || defined(__CYGWIN__)
// || defined(__SYMBIAN32__)
@@ -1793,7 +1793,7 @@
zero_timeout.tv_usec = 0;
timeval* timeout = (state & user_set_non_blocking) ? &zero_timeout : 0;
clear_last_error();
- int result = error_wrapper(::select(s, 0, &fds, 0, timeout), ec);
+ int result = error_wrapper(::select(s + 1, 0, &fds, 0, timeout), ec);
#else // defined(BOOST_ASIO_WINDOWS)
// || defined(__CYGWIN__)
// || defined(__SYMBIAN32__)
@@ -1833,7 +1833,8 @@
FD_ZERO(&except_fds);
FD_SET(s, &except_fds);
clear_last_error();
- int result = error_wrapper(::select(s, 0, &write_fds, &except_fds, 0), ec);
+ int result = error_wrapper(::select(
+ s + 1, 0, &write_fds, &except_fds, 0), ec);
if (result >= 0)
ec = boost::system::error_code();
return result;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk