X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/ff38eaf67773e0039befb95c0f9ad91e7a06fc3f..a41c510e42db7fc20b0e6abf7bc56a747e7d5a35:/src/utils/padsp.c diff --git a/src/utils/padsp.c b/src/utils/padsp.c index dfa5aac2..41bfd741 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -53,6 +53,7 @@ #include #include #include +#include /* On some systems SIOCINQ isn't defined, but FIONREAD is just an alias */ #if !defined(SIOCINQ) && defined(FIONREAD) @@ -459,15 +460,16 @@ static void reset_params(fd_info *i) { } static const char *client_name(char *buf, size_t n) { - char p[PATH_MAX]; + char *p; const char *e; if ((e = getenv("PADSP_CLIENT_NAME"))) return e; - if (pa_get_binary_name(p, sizeof(p))) + if ((p = pa_get_binary_name_malloc())) { snprintf(buf, n, "OSS Emulation[%s]", p); - else + pa_xfree(p); + } else snprintf(buf, n, "OSS"); return buf; @@ -1819,7 +1821,7 @@ fail: pa_threaded_mainloop_unlock(i->mainloop); - return 0; + return r; } static int dsp_trigger(fd_info *i) { @@ -1862,7 +1864,7 @@ fail: pa_threaded_mainloop_unlock(i->mainloop); - return 0; + return r; } static int dsp_cork(fd_info *i, pa_stream *s, int b) { @@ -1900,7 +1902,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) {