summaryrefslogtreecommitdiffstats
path: root/polyp/client.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-04 00:27:36 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-04 00:27:36 +0000
commit57e473b61cf373f8d9befb03d359b999eca4262b (patch)
tree0c4d0798db9c4ecf4804aaaff60e9fe8b30ac0f6 /polyp/client.c
parentfb962b67dbeb54d1cdd453c6f902b7c679b9197f (diff)
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
Diffstat (limited to 'polyp/client.c')
-rw-r--r--polyp/client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/polyp/client.c b/polyp/client.c
index 0cb42466..c7fb1e07 100644
--- a/polyp/client.c
+++ b/polyp/client.c
@@ -51,6 +51,8 @@ struct pa_client *pa_client_new(struct pa_core *core, const char *protocol_name,
fprintf(stderr, "client: created %u \"%s\"\n", c->index, c->name);
pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_NEW, c->index);
+
+ pa_core_check_quit(core);
return c;
}
@@ -59,10 +61,14 @@ void pa_client_free(struct pa_client *c) {
assert(c && c->core);
pa_idxset_remove_by_data(c->core->clients, c, NULL);
+
+ pa_core_check_quit(c->core);
+
fprintf(stderr, "client: freed %u \"%s\"\n", c->index, c->name);
pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
pa_xfree(c->name);
pa_xfree(c);
+
}
void pa_client_kill(struct pa_client *c) {