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:
Lennart Poettering 2004-09-04 00:27:36 +00:00
parent fb962b67db
commit 57e473b61c
23 changed files with 155 additions and 37 deletions

View file

@ -83,15 +83,16 @@ static const char* const valid_modargs[] = {
static struct pa_socket_server *create_socket_server(struct pa_core *c, struct pa_modargs *ma) {
struct pa_socket_server *s;
#ifdef USE_TCP_SOCKETS
uint32_t loopback = 1, port = IPV4_PORT;
int loopback = 1;
uint32_t port = IPV4_PORT;
if (pa_modargs_get_value_u32(ma, "loopback", &loopback) < 0) {
if (pa_modargs_get_value_boolean(ma, "loopback", &loopback) < 0) {
fprintf(stderr, "loopback= expects a numerical argument.\n");
return NULL;
}
if (pa_modargs_get_value_u32(ma, "port", &port) < 0) {
fprintf(stderr, "port= expects a numerical argument.\n");
if (pa_modargs_get_value_u32(ma, "port", &port) < 0 || port < 1 || port > 0xFFFF) {
fprintf(stderr, "port= expects a numerical argument between 1 and 65535.\n");
return NULL;
}