Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not build the tracing buffer if tracing is not active.

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6180 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
commit 8ddb79de7f8943ff04cc9a68301f34f3693d5208 1 parent 32794c3
@alobbs alobbs authored
Showing with 14 additions and 12 deletions.
  1. +14 −12 cherokee/handler_secdownload.c
View
26 cherokee/handler_secdownload.c
@@ -193,18 +193,20 @@ cherokee_handler_secdownload_new (cherokee_handler_t **hdl,
re = strncasecmp (md5.buf, &conn->request.buf[1], 32);
if (re != 0) {
#ifdef TRACE_ENABLED
- cherokee_buffer_t tmp = CHEROKEE_BUF_INIT;
-
- cherokee_buffer_add_str (&tmp, "secret='");
- cherokee_buffer_add_buffer (&tmp, &PROP_SECDOWN(props)->secret);
- cherokee_buffer_add_str (&tmp, "', path='");
- cherokee_buffer_add (&tmp, p, path_len);
- cherokee_buffer_add_str (&tmp, "', time='");
- cherokee_buffer_add (&tmp, time_s, 8);
- cherokee_buffer_add_str (&tmp, "'");
-
- TRACE(ENTRIES, "MD5 (%s) didn't match (%s)\n", md5.buf, tmp.buf);
- cherokee_buffer_mrproper(&tmp);
+ if (cherokee_trace_is_tracing()) {
+ cherokee_buffer_t tmp = CHEROKEE_BUF_INIT;
+
+ cherokee_buffer_add_str (&tmp, "secret='");
+ cherokee_buffer_add_buffer (&tmp, &PROP_SECDOWN(props)->secret);
+ cherokee_buffer_add_str (&tmp, "', path='");
+ cherokee_buffer_add (&tmp, p, path_len);
+ cherokee_buffer_add_str (&tmp, "', time='");
+ cherokee_buffer_add (&tmp, time_s, 8);
+ cherokee_buffer_add_str (&tmp, "'");
+
+ TRACE(ENTRIES, "MD5 (%s) didn't match (%s)\n", md5.buf, tmp.buf);
+ cherokee_buffer_mrproper(&tmp);
+ }
#endif
cherokee_buffer_mrproper(&md5);
Please sign in to comment.
Something went wrong with that request. Please try again.