summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2016-03-04 15:16:54 +0200
committerTanu Kaskinen <tanuk@iki.fi>2016-03-08 10:21:13 +0200
commitff85bc437c1ab40d4e83bacf31e96c105639f6d8 (patch)
tree81859ed58a975d89f771f218136a48970341702e
parentc87917cf0da9add5c282a1c15831fd481f9fcc22 (diff)
downloadpulseaudio-ff85bc437c1ab40d4e83bacf31e96c105639f6d8.tar.gz
card-restore: save the database when shutting down
If u->save_time_event is non-NULL when the module is being unloaded, it means that there are some changes to the database that haven't yet been flushed to the disk. Acked-by: David Henningsson <david.henningsson@canonical.com>
-rw-r--r--src/modules/module-card-restore.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
index f9068439f..2660a2bb8 100644
--- a/src/modules/module-card-restore.c
+++ b/src/modules/module-card-restore.c
@@ -608,8 +608,10 @@ void pa__done(pa_module*m) {
if (!(u = m->userdata))
return;
- if (u->save_time_event)
+ if (u->save_time_event) {
u->core->mainloop->time_free(u->save_time_event);
+ pa_database_sync(u->database);
+ }
if (u->database)
pa_database_close(u->database);