summaryrefslogtreecommitdiffstats
path: root/polyp/authkey.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/authkey.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/authkey.c')
-rw-r--r--polyp/authkey.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/polyp/authkey.c b/polyp/authkey.c
index 3180b8fd..bbc45c37 100644
--- a/polyp/authkey.c
+++ b/polyp/authkey.c
@@ -36,6 +36,7 @@
#include "authkey.h"
#include "util.h"
+#include "log.h"
#define RANDOM_DEVICE "/dev/urandom"
@@ -80,7 +81,7 @@ static int generate(const char *fn, void *data, size_t length) {
} else {
uint8_t *p;
size_t l;
- fprintf(stderr, "WARNING: Failed to open entropy device '"RANDOM_DEVICE"': %s, falling back to unsecure pseudo RNG.\n", strerror(errno));
+ pa_log(__FILE__": WARNING: Failed to open entropy device '"RANDOM_DEVICE"': %s, falling back to unsecure pseudo RNG.\n", strerror(errno));
srandom(time(NULL));
@@ -122,7 +123,7 @@ int pa_authkey_load(const char *path, void *data, size_t length) {
}
if (ret < 0)
- fprintf(stderr, "Failed to load authorization key '%s': %s\n", path, (ret == -1) ? strerror(errno) : "file corrupt");
+ pa_log(__FILE__": Failed to load authorization key '%s': %s\n", path, (ret == -1) ? strerror(errno) : "file corrupt");
return ret;
}