]> code.delx.au - pulseaudio/commit
card: Ensure that there's always at least one profile.
authorTanu Kaskinen <tanuk@iki.fi>
Fri, 8 Jun 2012 18:49:10 +0000 (21:49 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Fri, 29 Jun 2012 11:24:43 +0000 (14:24 +0300)
commit12af302ac7834f90231f727f00c20cad2c2cb5da
tree20a069a87103825c23a90c3bd4711f4712b7a1db
parent1a6da64b16ae6aacb1af195275883b88c596a960
card: Ensure that there's always at least one profile.

In practice there is always at least one profile, and I
don't think there will ever be cards without profiles.
Therefore, I added assertions to pa_card_new() stating that
the card new data must always contain at least one profile.
Now a lot of code can be simplified, because it's guaranteed
that the profiles hashmap and the active_profile field are
always non-NULL.
src/modules/alsa/module-alsa-card.c
src/modules/bluetooth/module-bluetooth-device.c
src/modules/dbus/iface-card.c
src/modules/module-card-restore.c
src/modules/module-switch-on-port-available.c
src/pulsecore/card.c
src/pulsecore/cli-command.c
src/pulsecore/cli-text.c
src/pulsecore/protocol-native.c