From 4de397517bdb0ce26e0bdd039fd99bcba50f385e Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Mon, 29 Nov 2010 20:59:14 -0800 Subject: [PATCH] Write profile data if and only if requested. --- bluesky/util.c | 5 ++++- nfs3/rpc.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bluesky/util.c b/bluesky/util.c index 45bc9f5..d854460 100644 --- a/bluesky/util.c +++ b/bluesky/util.c @@ -393,7 +393,10 @@ void bluesky_profile_set_output(FILE *stream) void bluesky_profile_print(BlueSkyProfile *profile) { - FILE *stream = profiling_file ? profiling_file : stdout; + if (profiling_file == NULL) + return; + FILE *stream = profiling_file; + g_return_if_fail(profile != NULL); g_mutex_lock(profile->lock); diff --git a/nfs3/rpc.c b/nfs3/rpc.c index fe7d620..05d9722 100644 --- a/nfs3/rpc.c +++ b/nfs3/rpc.c @@ -231,7 +231,7 @@ async_rpc_send_reply(RPCRequest *req, void *result) bluesky_profile_add_event(req->profile, g_strdup("NFS reply sent")); - //bluesky_profile_print(req->profile); + bluesky_profile_print(req->profile); /* Clean up. */ bluesky_profile_free(req->profile); -- 2.20.1