mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-18 08:56:40 -05:00
add support for automatic termination of the daemon after the last client quit
remove all gcc warnings add boolean types for tagstruct and modargs git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@178 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
fb962b67db
commit
57e473b61c
23 changed files with 155 additions and 37 deletions
|
|
@ -366,7 +366,7 @@ fail:
|
|||
|
||||
struct pa_protocol_simple* pa_protocol_simple_new(struct pa_core *core, struct pa_socket_server *server, struct pa_module *m, struct pa_modargs *ma) {
|
||||
struct pa_protocol_simple* p = NULL;
|
||||
uint32_t enable;
|
||||
int enable;
|
||||
assert(core && server && ma);
|
||||
|
||||
p = pa_xmalloc0(sizeof(struct pa_protocol_simple));
|
||||
|
|
@ -385,14 +385,14 @@ struct pa_protocol_simple* pa_protocol_simple_new(struct pa_core *core, struct p
|
|||
p->sink_name = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL));
|
||||
|
||||
enable = 0;
|
||||
if (pa_modargs_get_value_u32(ma, "record", &enable) < 0) {
|
||||
if (pa_modargs_get_value_boolean(ma, "record", &enable) < 0) {
|
||||
fprintf(stderr, __FILE__": record= expects a numeric argument.\n");
|
||||
goto fail;
|
||||
}
|
||||
p->mode = enable ? RECORD : 0;
|
||||
|
||||
enable = 1;
|
||||
if (pa_modargs_get_value_u32(ma, "playback", &enable) < 0) {
|
||||
if (pa_modargs_get_value_boolean(ma, "playback", &enable) < 0) {
|
||||
fprintf(stderr, __FILE__": playback= expects a numeric argument.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue