diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -126,13 +126,14 @@ open_trace_stream() | |||
126 | "using standard log: %s"), | 126 | "using standard log: %s"), |
127 | mu_strerror(rc)); | 127 | mu_strerror(rc)); |
128 | mf_trace_stream = mf_strecho; | 128 | mf_trace_stream = mf_strecho; |
129 | } | 129 | } |
130 | } | 130 | } |
131 | 131 | ||
132 | void | 132 | void |
133 | trace(const char *fmt, ...) | 133 | trace(const char *fmt, ...) |
134 | { | 134 | { |
135 | if (do_trace) { | 135 | if (do_trace) { |
136 | int bval = 0; | ||
136 | va_list ap; | 137 | va_list ap; |
137 | 138 | ||
138 | if (!mf_trace_stream) | 139 | if (!mf_trace_stream) |
@@ -140,7 +141,15 @@ trace(const char *fmt, ...) | |||
140 | 141 | ||
141 | va_start(ap, fmt); | 142 | va_start(ap, fmt); |
142 | mu_stream_vprintf(mf_trace_stream, fmt, ap); | 143 | mu_stream_vprintf(mf_trace_stream, fmt, ap); |
143 | mu_stream_flush(mf_trace_stream); | 144 | bval = 1; |
145 | mu_stream_ioctl(mf_trace_stream, MU_IOCTL_FILTER, | ||
146 | MU_IOCTL_FILTER_SET_DISABLED, | ||
147 | &bval); | ||
148 | mu_stream_write(mf_trace_stream, "\n", 1, NULL); | ||
149 | bval = 0; | ||
150 | mu_stream_ioctl(mf_trace_stream, MU_IOCTL_FILTER, | ||
151 | MU_IOCTL_FILTER_SET_DISABLED, | ||
152 | &bval); | ||
144 | va_end(ap); | 153 | va_end(ap); |
145 | } | 154 | } |
146 | } | 155 | } |