diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-01-15 18:38:20 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-01-15 18:38:20 +0100 |
commit | 344c934edbd780e1efe9ac413402ee6d70fe29e3 (patch) | |
tree | 900bc4b3ca7621ffae2466ac56354f7c02aae02c /src/pulsecore/card.c | |
parent | b6deb0cc4c169b5ef9450586fc66b0b823ef249c (diff) |
maintain a list of sink inputs/source outputs as part of the pa_client object
Diffstat (limited to 'src/pulsecore/card.c')
-rw-r--r-- | src/pulsecore/card.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c index 4f3548b4..03b9ebd7 100644 --- a/src/pulsecore/card.c +++ b/src/pulsecore/card.c @@ -117,8 +117,8 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) { c->driver = pa_xstrdup(data->driver); c->module = data->module; - c->sinks = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); - c->sources = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); + c->sinks = pa_idxset_new(NULL, NULL); + c->sources = pa_idxset_new(NULL, NULL); c->configs = data->configs; data->configs = NULL; @@ -156,7 +156,9 @@ void pa_card_free(pa_card *c) { pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_REMOVE, c->index); + pa_assert(pa_idxset_isempty(c->sinks)); pa_idxset_free(c->sinks, NULL, NULL); + pa_assert(pa_idxset_isempty(c->sources)); pa_idxset_free(c->sources, NULL, NULL); while ((config = pa_hashmap_steal_first(c->configs))) |