mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
cleanup
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@18 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
78f386ad45
commit
b24546bede
19 changed files with 261 additions and 277 deletions
16
src/client.c
16
src/client.c
|
|
@ -12,11 +12,12 @@ struct client *client_new(struct core *core, const char *protocol_name, char *na
|
|||
|
||||
c = malloc(sizeof(struct client));
|
||||
assert(c);
|
||||
c->protocol_name = protocol_name;
|
||||
c->name = name ? strdup(name) : NULL;
|
||||
c->kill = NULL;
|
||||
c->kill_userdata = NULL;
|
||||
c->core = core;
|
||||
c->protocol_name = protocol_name;
|
||||
|
||||
c->kill = NULL;
|
||||
c->userdata = NULL;
|
||||
|
||||
r = idxset_put(core->clients, c, &c->index);
|
||||
assert(c->index != IDXSET_INVALID && r >= 0);
|
||||
|
|
@ -35,14 +36,9 @@ void client_free(struct client *c) {
|
|||
free(c);
|
||||
}
|
||||
|
||||
void client_set_kill_callback(struct client *c, void (*kill)(struct client *c, void *userdata), void *userdata) {
|
||||
assert(c && kill);
|
||||
c->kill = kill;
|
||||
c->kill_userdata = userdata;
|
||||
}
|
||||
|
||||
void client_kill(struct client *c) {
|
||||
assert(c);
|
||||
c->kill(c, c->kill_userdata);
|
||||
if (c->kill)
|
||||
c->kill(c);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue