From 4e3dc7ce68561c16254712d713b2ccd472b8afe7 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 22 May 2006 15:20:46 +0000 Subject: Wrap strerror() in a function that makes it thread safe and converts the output to UTF-8. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@945 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/polypcore/protocol-simple.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/polypcore/protocol-simple.c') diff --git a/src/polypcore/protocol-simple.c b/src/polypcore/protocol-simple.c index caffd5c9..f15f882a 100644 --- a/src/polypcore/protocol-simple.c +++ b/src/polypcore/protocol-simple.c @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -133,7 +134,7 @@ static int do_read(struct connection *c) { } if ((r = pa_iochannel_read(c->io, (uint8_t*) c->playback.current_memblock->data+c->playback.memblock_index, l)) <= 0) { - pa_log_debug(__FILE__": read() failed: %s", r == 0 ? "EOF" : strerror(errno)); + pa_log_debug(__FILE__": read(): %s", r == 0 ? "EOF" : pa_cstrerror(errno)); return -1; } @@ -167,7 +168,7 @@ static int do_write(struct connection *c) { if ((r = pa_iochannel_write(c->io, (uint8_t*) chunk.memblock->data+chunk.index, chunk.length)) < 0) { pa_memblock_unref(chunk.memblock); - pa_log(__FILE__": write(): %s", strerror(errno)); + pa_log(__FILE__": write(): %s", pa_cstrerror(errno)); return -1; } -- cgit