On Wed, 2013-11-20 at 15:42 +0200, Tanu Kaskinen wrote: > When setting attribute foo, or in this case the card profile, in my > opinion the thing passed to the set_foo() function should be of the > type of foo, not a string identifier that can be used to search for > the actual foo in set_foo(). > > This is mostly a question of taste, but there's at least some small > benefit from passing the actual object: often the profile object is > already available when calling pa_card_set_profile(), so passing the > card name would cause unnecessary searching when pa_card_set_profile() > needs to look up the profile from the hashmap. > --- > src/modules/bluetooth/module-bluetooth-policy.c | 2 +- > src/modules/bluetooth/module-bluez4-device.c | 8 ++++---- > src/modules/bluetooth/module-bluez5-device.c | 8 ++++---- > src/modules/dbus/iface-card-profile.c | 6 ++++++ > src/modules/dbus/iface-card-profile.h | 1 + > src/modules/dbus/iface-card.c | 2 +- > src/modules/module-card-restore.c | 2 +- > src/modules/module-switch-on-port-available.c | 2 +- > src/pulsecore/card.c | 11 +++-------- > src/pulsecore/card.h | 2 +- > src/pulsecore/cli-command.c | 8 +++++++- > src/pulsecore/protocol-native.c | 10 ++++++++-- > 12 files changed, 38 insertions(+), 24 deletions(-) No feedback received. I applied this patch now. -- Tanu