const char *device = NULL;
pa_channel_map map;
pa_cvolume vol;
- dbus_bool_t muted = false;
- dbus_bool_t apply_immediately = false;
+ dbus_bool_t muted = FALSE;
+ dbus_bool_t apply_immediately = FALSE;
struct dbus_entry *dbus_entry = NULL;
struct entry *e = NULL;
pa_assert_se(e = entry_read(de->userdata, de->entry_name));
- mute = e->muted_valid ? e->muted : false;
+ mute = e->muted_valid ? e->muted : FALSE;
pa_dbus_send_basic_variant_reply(conn, msg, DBUS_TYPE_BOOLEAN, &mute);
pa_assert_se(e = entry_read(de->userdata, de->entry_name));
device = e->device_valid ? e->device : "";
- mute = e->muted_valid ? e->muted : false;
+ mute = e->muted_valid ? e->muted : FALSE;
pa_assert_se((reply = dbus_message_new_method_return(msg)));
removed the sink element from the rule. */
si->save_sink = false;
/* This is cheating a bit. The sink input itself has not changed
- but the rules governing it's routing have, so we fire this event
+ but the rules governing its routing have, so we fire this event
such that other routing modules (e.g. module-device-manager)
will pick up the change and reapply their routing */
pa_subscription_post(si->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, si->index);
removed the source element from the rule. */
so->save_source = false;
/* This is cheating a bit. The source output itself has not changed
- but the rules governing it's routing have, so we fire this event
+ but the rules governing its routing have, so we fire this event
such that other routing modules (e.g. module-device-manager)
will pick up the change and reapply their routing */
pa_subscription_post(so->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, so->index);
pa_log("name=%s", name);
pa_log("device=%s %s", e->device, pa_yes_no(e->device_valid));
pa_log("channel_map=%s", pa_channel_map_snprint(t, sizeof(t), &e->channel_map));
- pa_log("volume=%s %s", pa_cvolume_snprint(t, sizeof(t), &e->volume), pa_yes_no(e->volume_valid));
+ pa_log("volume=%s %s",
+ pa_cvolume_snprint_verbose(t, sizeof(t), &e->volume, &e->channel_map, true),
+ pa_yes_no(e->volume_valid));
pa_log("mute=%s %s", pa_yes_no(e->muted), pa_yes_no(e->volume_valid));
entry_free(e);
}
pa_tagstruct_get_channel_map(t, &entry->channel_map) ||
pa_tagstruct_get_cvolume(t, &entry->volume) < 0 ||
pa_tagstruct_gets(t, &device) < 0 ||
- pa_tagstruct_get_boolean(t, &muted) < 0)
+ pa_tagstruct_get_boolean(t, &muted) < 0) {
+ entry_free(entry);
goto fail;
+ }
if (!name || !*name) {
entry_free(entry);
#ifdef HAVE_DBUS
u->dbus_protocol = pa_dbus_protocol_get(u->core);
- u->dbus_entries = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
+ u->dbus_entries = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL, (pa_free_cb_t) dbus_entry_free);
pa_assert_se(pa_dbus_protocol_add_interface(u->dbus_protocol, OBJECT_PATH, &stream_restore_interface_info, u) >= 0);
pa_assert_se(pa_dbus_protocol_register_extension(u->dbus_protocol, INTERFACE_STREAM_RESTORE) >= 0);
pa_assert_se(pa_dbus_protocol_unregister_extension(u->dbus_protocol, INTERFACE_STREAM_RESTORE) >= 0);
pa_assert_se(pa_dbus_protocol_remove_interface(u->dbus_protocol, OBJECT_PATH, stream_restore_interface_info.name) >= 0);
- pa_hashmap_free(u->dbus_entries, (pa_free_cb_t) dbus_entry_free);
+ pa_hashmap_free(u->dbus_entries);
pa_dbus_protocol_unref(u->dbus_protocol);
}