mirror of
https://github.com/opnsense/src.git
synced 2026-02-16 17:19:56 -05:00
We have to adjust curthread's state enough so that it appears to be
in a poll(2) or select(2) call so that selrecord() will work and then
teardown that state after calling sopoll().
- Fix some minor nits in nearby ncp_sock_rselect() and in the identical
nbssn_rselect() function in the netsmb code:
- Don't call nb_poll()/ncp_poll() now that ncp_poll() already fakes up
poll(2) state since the rselect() functions already do that. Just
invoke sopoll() directly.
- To make things slightly more intuitive, store the results of sopoll()
in a new 'revents' variable rather than 'error' since that's what
sopoll() actually returns.
- If the requested timeout time has been exceeded by the time we get
ready to block, then return EWOULDBLOCK rather than 0 to signal a
timeout as this is what the calling code expects.
Tested by: Eric Christeson <eric.j.christeson AT gmail> (1)
MFC after: 1 week
|
||
|---|---|---|
| .. | ||
| ncp.h | ||
| ncp_cfg.h | ||
| ncp_conn.c | ||
| ncp_conn.h | ||
| ncp_crypt.c | ||
| ncp_file.h | ||
| ncp_lib.h | ||
| ncp_login.c | ||
| ncp_mod.c | ||
| ncp_ncp.c | ||
| ncp_ncp.h | ||
| ncp_nls.c | ||
| ncp_nls.h | ||
| ncp_rcfile.h | ||
| ncp_rq.c | ||
| ncp_rq.h | ||
| ncp_sock.c | ||
| ncp_sock.h | ||
| ncp_subr.c | ||
| ncp_subr.h | ||
| ncp_user.h | ||
| ncpio.h | ||
| nwerror.h | ||