device-manager: Fix the writing of the database when priority doesn't change.

This commit is contained in:
Colin Guthrie 2009-10-01 20:13:38 +01:00
parent 7633bb8a29
commit b8a6436d4b

View file

@ -1281,7 +1281,9 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
first = TRUE;
for (i = 0; i < n_devices; ++i) {
if ((e = read_entry(u, devices[i]->device)) && ENTRY_VERSION == e->version) {
if (e->priority[role_index] != idx) {
if (e->priority[role_index] == idx)
idx++;
else {
e->priority[role_index] = idx;
key.data = (char *) devices[i]->device;