[PATCH] card-restore: save the database when shutting down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks good to me.

Acked-by: David Henningsson <david.henningsson at canonical.com>

On 2016-03-04 14:16, Tanu Kaskinen wrote:
> 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.
> ---
>   src/modules/module-card-restore.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
> index f906843..2660a2b 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);
>

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux