diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/pacat.c | 2 | ||||
-rw-r--r-- | src/utils/pacmd.c | 2 | ||||
-rw-r--r-- | src/utils/pactl.c | 22 | ||||
-rw-r--r-- | src/utils/pasuspender.c | 2 |
4 files changed, 19 insertions, 9 deletions
diff --git a/src/utils/pacat.c b/src/utils/pacat.c index 5f29ba39..d348c16a 100644 --- a/src/utils/pacat.c +++ b/src/utils/pacat.c @@ -906,7 +906,7 @@ int main(int argc, char *argv[]) { filename = argv[optind]; - if ((fd = open(argv[optind], mode == PLAYBACK ? O_RDONLY : O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) { + if ((fd = pa_open_cloexec(argv[optind], mode == PLAYBACK ? O_RDONLY : O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) { pa_log(_("open(): %s"), strerror(errno)); goto quit; } diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c index 5ef57e3b..ef58e9ce 100644 --- a/src/utils/pacmd.c +++ b/src/utils/pacmd.c @@ -70,7 +70,7 @@ int main(int argc, char*argv[]) { goto fail; } - if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { + if ((fd = pa_socket_cloexec(PF_UNIX, SOCK_STREAM, 0)) < 0) { pa_log(_("socket(PF_UNIX, SOCK_STREAM, 0): %s"), strerror(errno)); goto fail; } diff --git a/src/utils/pactl.c b/src/utils/pactl.c index 141ab5b1..ee67c425 100644 --- a/src/utils/pactl.c +++ b/src/utils/pactl.c @@ -44,8 +44,6 @@ #include <pulsecore/log.h> #include <pulsecore/sndfile-util.h> -#define BUFSIZE (16*1024) - static pa_context *context = NULL; static pa_mainloop_api *mainloop_api = NULL; @@ -158,10 +156,23 @@ static void get_server_info_callback(pa_context *c, const pa_server_info *i, voi return; } + printf(_("Server String: %s\n" + "Library Protocol Version: %u\n" + "Server Protocol Version: %u\n" + "Is Local: %s\n" + "Client Index: %u\n" + "Tile Size: %zu\n"), + pa_context_get_server(c), + pa_context_get_protocol_version(c), + pa_context_get_server_protocol_version(c), + pa_yes_no(pa_context_is_local(c)), + pa_context_get_index(c), + pa_context_get_tile_size(c, NULL)); + pa_sample_spec_snprint(ss, sizeof(ss), &i->sample_spec); pa_channel_map_snprint(cm, sizeof(cm), &i->channel_map); - printf(_("User name: %s\n" + printf(_("User Name: %s\n" "Host Name: %s\n" "Server Name: %s\n" "Server Version: %s\n" @@ -169,7 +180,7 @@ static void get_server_info_callback(pa_context *c, const pa_server_info *i, voi "Default Channel Map: %s\n" "Default Sink: %s\n" "Default Source: %s\n" - "Cookie: %08x\n"), + "Cookie: %04x:%04x\n"), i->user_name, i->host_name, i->server_name, @@ -178,7 +189,8 @@ static void get_server_info_callback(pa_context *c, const pa_server_info *i, voi cm, i->default_sink_name, i->default_source_name, - i->cookie); + i->cookie >> 16, + i->cookie & 0xFFFFU); complete_action(); } diff --git a/src/utils/pasuspender.c b/src/utils/pasuspender.c index c327ee41..534b77b4 100644 --- a/src/utils/pasuspender.c +++ b/src/utils/pasuspender.c @@ -45,8 +45,6 @@ #include <pulse/pulseaudio.h> #include <pulsecore/macro.h> -#define BUFSIZE 1024 - static pa_context *context = NULL; static pa_mainloop_api *mainloop_api = NULL; static char **child_argv = NULL; |