diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2009-10-02 17:24:44 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2009-10-02 17:24:44 +0300 |
commit | 019331d25b6af107fb8cacc3ada552e7567a64bf (patch) | |
tree | d5545e795e164fb6cd8edae1a45e7b8bb966ee12 /src/utils/padsp.c | |
parent | 587131917f9129c8347c789febb7e755dfb091de (diff) | |
parent | afd1b6d355ef1a41cb3592485855e273a5de69c1 (diff) |
Merge branch 'master' into dbus-work
Conflicts:
src/daemon/daemon-conf.c
Diffstat (limited to 'src/utils/padsp.c')
-rw-r--r-- | src/utils/padsp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/utils/padsp.c b/src/utils/padsp.c index 882522c4..2ed0a039 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -1394,11 +1394,13 @@ static int sndstat_open(int flags, int *_errno) { "Mixers:\n" "0: PulseAudio Virtual OSS\n"; - char fn[] = "/tmp/padsp-sndstat-XXXXXX"; + char *fn; mode_t u; int fd = -1; int e; + fn = pa_sprintf_malloc("%s" PA_PATH_SEP "padsp-sndstat-XXXXXX", pa_get_temp_dir()); + debug(DEBUG_LEVEL_NORMAL, __FILE__": sndstat_open()\n"); if (flags != O_RDONLY @@ -1423,6 +1425,7 @@ static int sndstat_open(int flags, int *_errno) { } unlink(fn); + pa_xfree(fn); if (write(fd, sndstat, sizeof(sndstat) -1) != sizeof(sndstat)-1) { *_errno = errno; @@ -1439,6 +1442,7 @@ static int sndstat_open(int flags, int *_errno) { return fd; fail: + pa_xfree(fn); if (fd >= 0) close(fd); return -1; @@ -1821,7 +1825,7 @@ fail: pa_threaded_mainloop_unlock(i->mainloop); - return 0; + return r; } static int dsp_trigger(fd_info *i) { @@ -1864,7 +1868,7 @@ fail: pa_threaded_mainloop_unlock(i->mainloop); - return 0; + return r; } static int dsp_cork(fd_info *i, pa_stream *s, int b) { @@ -1902,7 +1906,7 @@ fail: pa_threaded_mainloop_unlock(i->mainloop); - return 0; + return r; } static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno) { |