mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
draining ind native protocol
fixes in callback code on object destruction simple protocol git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@52 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
f8cbde54da
commit
e8d1185c42
38 changed files with 843 additions and 364 deletions
15
src/util.c
15
src/util.c
|
|
@ -1,3 +1,4 @@
|
|||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
|
@ -51,7 +52,7 @@ void pa_peer_to_string(char *c, size_t l, int fd) {
|
|||
ntohs(sa.in.sin_port));
|
||||
return;
|
||||
} else if (sa.sa.sa_family == AF_LOCAL) {
|
||||
snprintf(c, l, "UNIX client for %s", sa.un.sun_path);
|
||||
snprintf(c, l, "UNIX socket client");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -208,3 +209,15 @@ int pa_unix_socket_remove_stale(const char *fn) {
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pa_check_for_sigpipe(void) {
|
||||
struct sigaction sa;
|
||||
|
||||
if (sigaction(SIGPIPE, NULL, &sa) < 0) {
|
||||
fprintf(stderr, __FILE__": sigaction() failed: %s\n", strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
if (sa.sa_handler == SIG_DFL)
|
||||
fprintf(stderr, "polypaudio: WARNING: SIGPIPE is not trapped. This might cause malfunction!\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue