Date: Sat, 30 May 2009 19:23:09 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r193109 - head/lib/libstand Message-ID: <200905301923.n4UJN9S8016729@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Sat May 30 19:23:09 2009 New Revision: 193109 URL: http://svn.freebsd.org/changeset/base/193109 Log: Print the returned port number when RPC_DEBUG is defined. This improves debugging. Modified: head/lib/libstand/rpc.c Modified: head/lib/libstand/rpc.c ============================================================================== --- head/lib/libstand/rpc.c Sat May 30 19:21:56 2009 (r193108) +++ head/lib/libstand/rpc.c Sat May 30 19:23:09 2009 (r193109) @@ -405,17 +405,19 @@ rpc_getport(d, prog, vers) #ifdef RPC_DEBUG if (debug) - printf("getport: prog=0x%x vers=%d\n", prog, vers); + printf("%s: prog=0x%x vers=%d\n", __func__, prog, vers); #endif /* This one is fixed forever. */ - if (prog == PMAPPROG) - return (PMAPPORT); + if (prog == PMAPPROG) { + port = PMAPPORT; + goto out; + } /* Try for cached answer first */ port = rpc_pmap_getcache(d->destip, prog, vers); if (port != -1) - return (port); + goto out; args = &sdata.d; args->prog = htonl(prog); @@ -435,5 +437,10 @@ rpc_getport(d, prog, vers) rpc_pmap_putcache(d->destip, prog, vers, port); +out: +#ifdef RPC_DEBUG + if (debug) + printf("%s: port=%u\n", __func__, port); +#endif return (port); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905301923.n4UJN9S8016729>