From owner-cvs-all Tue Mar 27 13:27:39 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7073A37B71D; Tue, 27 Mar 2001 13:27:33 -0800 (PST) (envelope-from wpaul@FreeBSD.org) Received: (from wpaul@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2RLRXR41377; Tue, 27 Mar 2001 13:27:33 -0800 (PST) (envelope-from wpaul) Message-Id: <200103272127.f2RLRXR41377@freefall.freebsd.org> From: Bill Paul Date: Tue, 27 Mar 2001 13:27:33 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/rpc clnt_dg.c src/include/rpc clnt.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG wpaul 2001/03/27 13:27:33 PST Modified files: lib/libc/rpc clnt_dg.c include/rpc clnt.h Log: Add a CLSET_ASYNC command, which allows us to (ab)use the clnt_dg transport to make asynchronous RPCs. This is needed to help fix ypbind, which can no longer override the clnt_dg_call() method (formerly the clntudp_call() method) due to all the internal descriptor locking code in TI-RPC. Turning on this flag allows us to send an RPC request, then return immediately, and handle a reply later, rather than being forced to do the request and reply in a single function call. Also fix a byte ordering bug: when clnt_dg_call() increments the XID prior to transmitting a request, it uses the raw value, which is wrong. The XID is stored in network byte order, i.e. big-endian. The CLSET_XID and CLGET_XID commands in clnt_dg_control() use ntohl()/htonl() to get the byte ordering right, but because clnt_dg_call() does not do this, using CLSET_XID/CLGET_XID doesn't actually work, unless you're on a big endian host, which we aren't (yet). Fix clnt_dg_call() to byte swap properly when doing the increment. Revision Changes Path 1.2 +20 -4 src/lib/libc/rpc/clnt_dg.c 1.13 +2 -1 src/include/rpc/clnt.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message