summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/authkey.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-07-14 22:42:01 +0000
committerLennart Poettering <lennart@poettering.net>2006-07-14 22:42:01 +0000
commit860be2e70b33ff5eeb9130f80c4b1c096a2a8f27 (patch)
treea3193083ecdb5055a4536c22ea394c8243731571 /src/pulsecore/authkey.c
parent350a253dc559956b63ced4e602b1040ccba66f98 (diff)
try to use send(,,MSG_NOSIGNAL) instead of write() wherever possible (which
will allow us to drop the SIGPIPE check). Cache the results of the last write()/send() to make sure that we do not issue more than necessary system calls. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1083 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/authkey.c')
-rw-r--r--src/pulsecore/authkey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c
index 064209d9..a5df3ed1 100644
--- a/src/pulsecore/authkey.c
+++ b/src/pulsecore/authkey.c
@@ -53,7 +53,7 @@ static int generate(int fd, void *ret_data, size_t length) {
lseek(fd, 0, SEEK_SET);
ftruncate(fd, 0);
- if ((r = pa_loop_write(fd, ret_data, length)) < 0 || (size_t) r != length) {
+ if ((r = pa_loop_write(fd, ret_data, length, NULL)) < 0 || (size_t) r != length) {
pa_log(__FILE__": failed to write cookie file: %s", pa_cstrerror(errno));
return -1;
}
@@ -84,7 +84,7 @@ static int load(const char *fn, void *data, size_t length) {
unlock = pa_lock_fd(fd, 1) >= 0;
- if ((r = pa_loop_read(fd, data, length)) < 0) {
+ if ((r = pa_loop_read(fd, data, length, NULL)) < 0) {
pa_log(__FILE__": failed to read cookie file '%s': %s", fn, pa_cstrerror(errno));
goto finish;
}
@@ -188,7 +188,7 @@ int pa_authkey_save(const char *fn, const void *data, size_t length) {
unlock = pa_lock_fd(fd, 1) >= 0;
- if ((r = pa_loop_write(fd, data, length)) < 0 || (size_t) r != length) {
+ if ((r = pa_loop_write(fd, data, length, NULL)) < 0 || (size_t) r != length) {
pa_log(__FILE__": failed to read cookie file '%s': %s", fn, pa_cstrerror(errno));
goto finish;
}