Do not invalidate the cookie if no file was specified.
authorColin Guthrie <pulse@colin.guthr.ie>
Mon, 9 Jun 2008 18:21:56 +0000 (18:21 +0000)
committerColin Guthrie <pulse@colin.guthr.ie>
Mon, 9 Jun 2008 18:21:56 +0000 (18:21 +0000)
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

src/pulse/client-conf.c

index 75f4418..17334a4 100644 (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;