From: Michael Vrable Date: Tue, 30 Nov 2010 04:59:14 +0000 (-0800) Subject: Write profile data if and only if requested. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=4de397517bdb0ce26e0bdd039fd99bcba50f385e;p=bluesky.git Write profile data if and only if requested. --- 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);