If write_entry fails to store new entry in database, next time we can try creating new entry again.
With DBUS enabled this will create another dbus entry for same name leading to crash inserting duplicate into dbus_entries map.
Fix this by checking if dbus entry exists in dbus_entries map before creating it.
Fixes: #974
}
#ifdef HAVE_DBUS
- if (created_new_entry) {
+ if (!(de = pa_hashmap_get(u->dbus_entries, name))) {
de = dbus_entry_new(u, name);
pa_assert_se(pa_hashmap_put(u->dbus_entries, de->entry_name, de) == 0);
send_new_entry_signal(de);
} else {
- pa_assert_se(de = pa_hashmap_get(u->dbus_entries, name));
-
if (device_updated)
send_device_updated_signal(de, entry);
if (volume_updated)