summaryrefslogtreecommitdiffstats
path: root/polyp/socket-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-05 00:03:16 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-05 00:03:16 +0000
commit6c4fd620408b3f14a1d4164d58db70df7a252674 (patch)
tree3767a0fb76a3941267f9b6980075149dc31cb6bc /polyp/socket-util.c
parent57e473b61cf373f8d9befb03d359b999eca4262b (diff)
implement proper logging
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@179 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/socket-util.c')
-rw-r--r--polyp/socket-util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/polyp/socket-util.c b/polyp/socket-util.c
index 1f93ef88..2f082bfb 100644
--- a/polyp/socket-util.c
+++ b/polyp/socket-util.c
@@ -41,6 +41,7 @@
#include "socket-util.h"
#include "util.h"
#include "xmalloc.h"
+#include "log.h"
void pa_socket_peer_to_string(int fd, char *c, size_t l) {
struct stat st;
@@ -122,7 +123,7 @@ int pa_socket_set_rcvbuf(int fd, size_t l) {
assert(fd >= 0);
if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &l, sizeof(l)) < 0) {
- fprintf(stderr, "SO_RCVBUF: %s\n", strerror(errno));
+ pa_log(__FILE__": SO_RCVBUF: %s\n", strerror(errno));
return -1;
}
@@ -133,7 +134,7 @@ int pa_socket_set_sndbuf(int fd, size_t l) {
assert(fd >= 0);
if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &l, sizeof(l)) < 0) {
- fprintf(stderr, "SO_SNDBUF: %s\n", strerror(errno));
+ pa_log(__FILE__": SO_SNDBUF: %s\n", strerror(errno));
return -1;
}
@@ -145,7 +146,7 @@ int pa_unix_socket_is_stale(const char *fn) {
int fd = -1, ret = -1;
if ((fd = socket(PF_LOCAL, SOCK_STREAM, 0)) < 0) {
- fprintf(stderr, "socket(): %s\n", strerror(errno));
+ pa_log(__FILE__": socket(): %s\n", strerror(errno));
goto finish;
}