From: Steve Dickson <steved@redhat.com>
To: Libtirpc-devel Mailing List <libtirpc-devel@lists.sourceforge.net>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH 11/15] key_call: Convert local debug() calls to LIBTIRPC_DEBUG() calls
Date: Tue, 15 Jul 2014 11:09:30 -0400 [thread overview]
Message-ID: <1405436974-4161-12-git-send-email-steved@redhat.com> (raw)
In-Reply-To: <1405436974-4161-1-git-send-email-steved@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
src/key_call.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/key_call.c b/src/key_call.c
index 906b2f6..8b9f388 100644
--- a/src/key_call.c
+++ b/src/key_call.c
@@ -59,16 +59,11 @@
#include <sys/wait.h>
#include <sys/fcntl.h>
+#include "dump.h"
#define KEY_TIMEOUT 5 /* per-try timeout in seconds */
#define KEY_NRETRY 12 /* number of retries */
-#ifdef DEBUG
-#define debug(msg) (void) fprintf(stderr, "%s\n", msg);
-#else
-#define debug(msg)
-#endif /* DEBUG */
-
/*
* Hack to allow the keyserver to use AUTH_DES (for authenticated
* NIS+ calls, for example). The only functions that get called
@@ -96,7 +91,7 @@ key_setsecret(secretkey)
return (-1);
}
if (status != KEY_SUCCESS) {
- debug("set status is nonzero");
+ LIBTIRPC_DEBUG(1, ("key_setsecret: set status is nonzero"));
return (-1);
}
return (0);
@@ -144,7 +139,7 @@ key_encryptsession_pk(remotename, remotekey, deskey)
return (-1);
}
if (res.status != KEY_SUCCESS) {
- debug("encrypt status is nonzero");
+ LIBTIRPC_DEBUG(1, ("key_encryptsession_pk: encrypt status is nonzero"));
return (-1);
}
*deskey = res.cryptkeyres_u.deskey;
@@ -168,7 +163,7 @@ key_decryptsession_pk(remotename, remotekey, deskey)
return (-1);
}
if (res.status != KEY_SUCCESS) {
- debug("decrypt status is nonzero");
+ LIBTIRPC_DEBUG(1, ("key_decryptsession_pk: decrypt status is nonzero"));
return (-1);
}
*deskey = res.cryptkeyres_u.deskey;
@@ -190,7 +185,7 @@ key_encryptsession(remotename, deskey)
return (-1);
}
if (res.status != KEY_SUCCESS) {
- debug("encrypt status is nonzero");
+ LIBTIRPC_DEBUG(1, ("key_encryptsession: encrypt status is nonzero"));
return (-1);
}
*deskey = res.cryptkeyres_u.deskey;
@@ -212,7 +207,7 @@ key_decryptsession(remotename, deskey)
return (-1);
}
if (res.status != KEY_SUCCESS) {
- debug("decrypt status is nonzero");
+ LIBTIRPC_DEBUG(1, ("key_decryptsession: decrypt status is nonzero"));
return (-1);
}
*deskey = res.cryptkeyres_u.deskey;
@@ -243,7 +238,7 @@ struct key_netstarg *arg;
}
if (status != KEY_SUCCESS) {
- debug("key_setnet status is nonzero");
+ LIBTIRPC_DEBUG(1, ("key_setnet: key_setnet status is nonzero"));
return (-1);
}
return (1);
@@ -262,7 +257,7 @@ key_get_conv(pkey, deskey)
return (-1);
}
if (res.status != KEY_SUCCESS) {
- debug("get_conv status is nonzero");
+ LIBTIRPC_DEBUG(1, ("key_get_conv: get_conv status is nonzero"));
return (-1);
}
*deskey = res.cryptkeyres_u.deskey;
--
1.9.3
next prev parent reply other threads:[~2014-07-15 15:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-15 15:09 [PATCH 00/15] libtirpc: New Debugging Interface Steve Dickson
2014-07-15 15:09 ` [PATCH 01/15] libtirpc: New configurable debugging routines Steve Dickson
2014-07-15 15:09 ` [PATCH 02/15] gss_log: Convert existing gss " Steve Dickson
2014-07-15 15:09 ` [PATCH 03/15] gss_log: Removed DEBUG defines Steve Dickson
2014-07-15 15:09 ` [PATCH 04/15] gss_log_status: reformat output to use one line Steve Dickson
2014-07-15 15:09 ` [PATCH 05/15] git_log_status: Add function names to status message Steve Dickson
2014-07-15 15:09 ` [PATCH 06/15] libtirpc_debug: Converted the rest of the #ifdef DEBUGs Steve Dickson
2014-07-15 15:09 ` [PATCH 07/15] gss_log: Replace gss_log_debug with LIBTIRPC_DEBUG macros Steve Dickson
2014-07-15 15:09 ` [PATCH 08/15] print_rpc_gss_sec: Make sure logging to stderr is enabled Steve Dickson
2014-07-15 15:09 ` [PATCH 09/15] Clean up: Remove newlines from a couple debugging calls Steve Dickson
2014-07-15 15:09 ` [PATCH 10/15] svcauth_des: Convert local debug() calls to LIBTIRPC_DEBUG() calls Steve Dickson
2014-07-15 15:09 ` Steve Dickson [this message]
2014-07-15 15:09 ` [PATCH 12/15] clnt_bcast: " Steve Dickson
2014-07-15 15:09 ` [PATCH 13/15] rpcb_clnt: Convert fprintf " Steve Dickson
2014-07-15 15:09 ` [PATCH 14/15] svc_dg: " Steve Dickson
2014-07-15 15:09 ` [PATCH 15/15] auth_des: Converted some of the debugging syslog " Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405436974-4161-12-git-send-email-steved@redhat.com \
--to=steved@redhat.com \
--cc=libtirpc-devel@lists.sourceforge.net \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox