]> code.delx.au - pulseaudio/commitdiff
Don't abort config loading when the user specific cannot be loaded.
authorPierre Ossman <ossman@cendio.se>
Mon, 5 Feb 2007 10:26:14 +0000 (10:26 +0000)
committerPierre Ossman <ossman@cendio.se>
Mon, 5 Feb 2007 10:26:14 +0000 (10:26 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1423 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/pulsecore/core-util.c

index b42dc0caa46d870aae8bf672591be301c223929c..1e8fd23b112c2b43d189cb581f64d6cc0d9363ea 100644 (file)
@@ -184,7 +184,7 @@ int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) {
         goto fail;
     }
 #else
-       pa_log_warn("secure directory creation not supported on Win32.");
+    pa_log_warn("secure directory creation not supported on Win32.");
 #endif
 
     return 0;
@@ -953,13 +953,19 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env
             fn = buf;
 #endif
 
-            if ((f = fopen(fn, mode)) || errno != ENOENT) {
+            f = fopen(fn, mode);
+            if (f != NULL) {
                 if (result)
                     *result = pa_xstrdup(fn);
                 pa_xfree(lfn);
                 return f;
             }
 
+            if (errno != ENOENT) {
+                pa_log_warn("WARNING: failed to open configuration file '%s': %s",
+                    lfn, pa_cstrerror(errno));
+            }
+
             pa_xfree(lfn);
         }
     }