diff options
author | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2013-06-20 17:24:27 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2013-07-15 16:46:06 +0300 |
commit | a1fdbcfaa77822bbfdcacb480fc2d75b95fa38aa (patch) | |
tree | b8f88813255de2016474cb1e747b667dd618b677 /src/pulsecore/log.c | |
parent | bc2ed3482a3917584a784d7a966e283b5458c176 (diff) |
log: Use pa_write() instead of write()
Diffstat (limited to 'src/pulsecore/log.c')
-rw-r--r-- | src/pulsecore/log.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c index 3e1a88164..49f1b5b0c 100644 --- a/src/pulsecore/log.c +++ b/src/pulsecore/log.c @@ -77,6 +77,7 @@ static unsigned show_backtrace = 0, show_backtrace_override = 0, skip_backtrace static pa_log_flags_t flags = 0, flags_override = 0; static bool no_rate_limit = false; static int log_fd = -1; +static int write_type = 0; #ifdef HAVE_SYSLOG_H static const int level_to_syslog[] = { @@ -470,7 +471,7 @@ void pa_log_levelv_meta( pa_snprintf(metadata, sizeof(metadata), "\n%c %s %s", level_to_char[level], timestamp, location); - if ((write(log_fd, metadata, strlen(metadata)) < 0) || (write(log_fd, t, strlen(t)) < 0)) { + if ((pa_write(log_fd, metadata, strlen(metadata), &write_type) < 0) || (pa_write(log_fd, t, strlen(t), &write_type) < 0)) { pa_log_target new_target = { .type = PA_LOG_STDERR, .file = NULL }; saved_errno = errno; fprintf(stderr, "%s\n", "Error writing logs to a file descriptor. Redirect log messages to console."); |