diff options
author | Steve Dickson <steved@redhat.com> | 2015-04-27 09:58:23 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2015-04-27 10:05:32 -0400 |
commit | 97a4f20bc75424418b3e8125a7b72f482d9fae2e (patch) | |
tree | 7740a41510373ec412257422b1d7e60cbb3564b2 /src/rpcbind.c | |
parent | c4a97e78a0d3f8ae88749d9b40220203a8527b3a (diff) | |
download | rpcbind-97a4f20bc75424418b3e8125a7b72f482d9fae2e.tar.gz |
rpcbind: enable debugging in libtirpcrpcbind-0_2_3-rc3
Recently a libtirpc_set_debug() command was
added to libtirpc that enables debugging in
the library.
Now when debug is enabled with rpcbind, this
new library debugging will be enabled as well,
when the interface exists.
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'src/rpcbind.c')
-rw-r--r-- | src/rpcbind.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rpcbind.c b/src/rpcbind.c index 6d8bed2..045daa1 100644 --- a/src/rpcbind.c +++ b/src/rpcbind.c @@ -117,6 +117,9 @@ int nhosts = 0; int on = 1; int rpcbindlockfd; +#ifdef LIB_SET_DEBUG +void libtirpc_set_debug(char *name, int level, int use_stderr); +#endif #ifdef WARMSTART /* Local Variable */ static int warmstart = 0; /* Grab an old copy of registrations. */ @@ -199,9 +202,12 @@ main(int argc, char *argv[]) xlog_syslog(FALSE); xlog_stderr(TRUE); } - if (debugging) + if (debugging) { xlog_config(D_ALL, 1); - +#ifdef LIB_SET_DEBUG + libtirpc_set_debug("rpcbind", debugging, (dofork == 0)); +#endif + } rpc_control(RPC_SVC_CONNMAXREC_SET, &maxrec); init_transport(nconf); @@ -870,7 +876,7 @@ parseargs(int argc, char *argv[]) break; /* errors; for rpcbind developers */ /* only! */ case 'd': - debugging = 1; + debugging++; break; case 'h': ++nhosts; |