freebsd-skq/sys/netncp
jhb 0daea30185 - Fix ncp_poll() to not panic if the socket doesn't have any pending data.
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
2006-08-03 15:31:52 +00:00
..
ncp_cfg.h
ncp_conn.c In ncp_sysctl_connstat(), the SLIST_FOREACH() logic to check 'error' 2006-01-14 11:40:32 +00:00
ncp_conn.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_crypt.c
ncp_file.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_lib.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_login.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_mod.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_ncp.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_ncp.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_nls.c avoid potential null ptr derefs 2005-02-23 22:44:38 +00:00
ncp_nls.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_rcfile.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_rq.c Change API of mb_copy_t in libmchain so that netsmb can handle 2005-07-29 13:22:37 +00:00
ncp_rq.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_sock.c - Fix ncp_poll() to not panic if the socket doesn't have any pending data. 2006-08-03 15:31:52 +00:00
ncp_sock.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_subr.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_subr.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp_user.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncp.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ncpio.h
nwerror.h