]> code.delx.au - pulseaudio/commit
device-restore: Simplify the migration of data to per-port keys.
authorColin Guthrie <colin@mageia.org>
Fri, 2 Sep 2011 11:51:26 +0000 (12:51 +0100)
committerColin Guthrie <colin@mageia.org>
Sat, 3 Sep 2011 10:47:10 +0000 (12:47 +0200)
commit47c9d8cf9288c6fa08722c7c59a04ca3d2e6d92a
treea12743b7f85c887fbcc010720680f886c091d481
parent9133c6c9359b6f22b25176fbd2c435a21590230c
device-restore: Simplify the migration of data to per-port keys.

Rather than write all the keys out for each port, simply write a 'null'
port entry and modify the read code to 'fallback' to this when it cannot
find a key. This is needed as the code used when writing the key may not
actually have the sink ports available at the time it uses them,
and thus can cause a segv. This approach adds some degree of overhead
but it's relatively minimal and it can be mitigated by compiling
without support for legacy database formats if so desired.

Thanks to David Henningsson for pointing out the problem.
src/modules/module-device-restore.c