diff options
author | wpaul <wpaul@FreeBSD.org> | 1996-12-25 18:10:35 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1996-12-25 18:10:35 +0000 |
commit | 9595ea6d1eb97fa3074c2f7c8e7b86d793ca6f8b (patch) | |
tree | 6077b7732802a3647746e612ca585a0ce843b915 /usr.sbin/ypserv/yp_main.c | |
parent | 59eadfda914b1a76f8105d01e61675cc806a5646 (diff) | |
download | FreeBSD-src-9595ea6d1eb97fa3074c2f7c8e7b86d793ca6f8b.zip FreeBSD-src-9595ea6d1eb97fa3074c2f7c8e7b86d793ca6f8b.tar.gz |
More async resolver refinements:
- yp_main.c: Always add the resolver socket to the set of fds
monitored by select(). It can happen that pending == 0 but we
still have some data in the socket buffer from an old query.
This way, the data will be flushed in a timely manner.
- yp_extern.h: remove proto for yp_dns_pending() since we don't need
it anynmore.
- yp_server.c: call yp_async_lookup_name()/yp_async_lookup_addr()
functions with the svc_req pointer as an arg instead of the xprt.
(The svc_req struct includes a pointer to the transport handle,
and it also has the service version number which the async DNS
code will need. (see below))
- yp_dnslookup.c:
o Nuke yp_dns_pending() since we don't need it anymore.
o In yp_run_dnsq(), swallow up and ignore replies if no requests
are pending or the ID doesn't match any of the IDs in the queue.
o In yp_send_dns_reply(), we assume that we will always be
replying to an NIS v2 client. While this will probably always
be the case, we do support the v1 'match' procedure, and it
has a different result struct than v2. For completeness,
support replying to both NIS v1 and v2 clients.
o Update the queue entry structure to include a member to
keep track of the NIS version number.
o Have yp_async_lookup_name/addr() extract the version number
from the svc_req structure and save it with the queue entry
for yp_send_dns_reply() to inspect later.
o Add some comments.
Diffstat (limited to 'usr.sbin/ypserv/yp_main.c')
-rw-r--r-- | usr.sbin/ypserv/yp_main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c index db40ac6..b172180 100644 --- a/usr.sbin/ypserv/yp_main.c +++ b/usr.sbin/ypserv/yp_main.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: yp_main.c,v 1.4 1996/12/22 15:54:03 wpaul Exp $ + * $Id: yp_main.c,v 1.5 1996/12/24 07:52:52 wpaul Exp $ */ /* @@ -66,7 +66,7 @@ #define _RPCSVC_CLOSEDOWN 120 #ifndef lint -static const char rcsid[] = "$Id: yp_main.c,v 1.4 1996/12/22 15:54:03 wpaul Exp $"; +static const char rcsid[] = "$Id: yp_main.c,v 1.5 1996/12/24 07:52:52 wpaul Exp $"; #endif /* not lint */ int _rpcpmstart; /* Started by a port monitor ? */ static int _rpcfdtype; @@ -122,8 +122,7 @@ yp_svc_run() readfds = svc_fds; #endif /* def FD_SETSIZE */ - if (yp_dnsq_pending()) - FD_SET(resfd, &readfds); + FD_SET(resfd, &readfds); switch (select(fd_setsize, &readfds, NULL, NULL, &timeout)) { |