]>
code.delx.au - pulseaudio/blob - src/client.c
7 struct client
*client_new(struct core
*core
, const char *protocol_name
, char *name
) {
12 c
= malloc(sizeof(struct client
));
14 c
->protocol_name
= protocol_name
;
15 c
->name
= name
? strdup(name
) : NULL
;
20 r
= idxset_put(core
->clients
, c
, &c
->index
);
21 assert(c
->index
!= IDXSET_INVALID
&& r
>= 0);
26 void client_free(struct client
*c
) {
29 idxset_remove_by_data(c
->core
->clients
, c
, NULL
);