Skip to content
Commit 5337176c authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Networking: setsockopt() fails when setting timeouts to values less that an...

Networking: setsockopt() fails when setting timeouts to values less that an 100 msec.  That is because the timeout is limited to stops of 1 decisecond and because the conversion of structure timeval was truncating the microsecond remainder.  The utility net_timeval2dsec now accespts and option to determin how it handles the remainder:  truncate, discarding the remainder, use the remainder to round to the closed decisecond value, or use any non-zero remainder to the next larger whole decisecond value.

For the setsockopt() case, it will always use the final option.  This means that a time of zero (i.e., not timeout) can only occur if the value zero was explicated provided to setsockopt().
parent 0595d544
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment