Do not invalidate the cookie if no file was specified.

Only invalidate it when a cookie-file is specified and it is not loaded/parsed correctly.
This fixes a bug introduced in r2494

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2498 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Colin Guthrie 2008-06-09 18:21:56 +00:00
parent 3e4afae7f6
commit 71fefa77db

View file

@ -178,11 +178,11 @@ int pa_client_conf_env(pa_client_conf *c) {
int pa_client_conf_load_cookie(pa_client_conf* c) {
pa_assert(c);
c->cookie_valid = FALSE;
if (!c->cookie_file)
return -1;
c->cookie_valid = FALSE;
if (pa_authkey_load_auto(c->cookie_file, c->cookie, sizeof(c->cookie)) < 0)
return -1;