From 29ab169d2bf29b8f9487d070571c1c751aa2567e Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Thu, 6 Aug 2015 10:10:45 +0200 Subject: [PATCH] init: do not write to stderr in rpc_set_error only log error if debug >= 1. Signed-off-by: Peter Lieven --- lib/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init.c b/lib/init.c index b898c39..874b027 100644 --- a/lib/init.c +++ b/lib/init.c @@ -168,7 +168,7 @@ void rpc_set_error(struct rpc_context *rpc, const char *error_string, ...) vsnprintf(rpc->error_string, 1024, error_string, ap); va_end(ap); - fprintf(stderr, "libnfs error: %s\n", rpc->error_string); + RPC_LOG(rpc, 1, "error: %s", rpc->error_string); if (old_error_string != NULL) { free(old_error_string);