]> code.delx.au - pulseaudio/commit
client-conf: Don't create multiple cookie files
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Wed, 19 Mar 2014 10:19:08 +0000 (12:19 +0200)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 28 Mar 2014 12:59:10 +0000 (14:59 +0200)
commit1116daa5ebe75073b6701e50ad80ac894d6e05f3
tree309c88a47694db54d819d70a8e67f293b5f3c1f4
parent0a583fe0c330d167f52784585afffdd8065a92cd
client-conf: Don't create multiple cookie files

The old code loaded cookies at the time of loading the client
configuration, which could lead to creation of multiple cookie files.
For example, when pa_client_conf_load() was called, the default cookie
file was created, and then if PULSE_COOKIE was set,
pa_client_conf_env() would create another cookie file.

This patch moves the loading of the cookie to a separate function,
which pa_context calls just before needing the cookie, so the cookie
won't be loaded from the default file if PULSE_COOKIE is set. This
patch also splits the single cookie and cookie_file fields in
pa_client_conf into multiple fields, one for each possible cookie
source. That change allows falling back to another cookie source if
the primary source doesn't work.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=75006
src/pulse/client-conf-x11.c
src/pulse/client-conf.c
src/pulse/client-conf.h
src/pulse/context.c