[pulseaudio-commits] r2187 - /branches/prepare-0.9.10/src/daemon/main.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Mar 28 11:09:26 PDT 2008


Author: lennart
Date: Fri Mar 28 19:09:25 2008
New Revision: 2187

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2187&root=pulseaudio&view=rev
Log:
don't fail on init if the default device does not exist and .nofail is active

Modified:
    branches/prepare-0.9.10/src/daemon/main.c

Modified: branches/prepare-0.9.10/src/daemon/main.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/prepare-0.9.10/src/daemon/main.c?rev=2187&root=pulseaudio&r1=2186&r2=2187&view=diff
==============================================================================
--- branches/prepare-0.9.10/src/daemon/main.c (original)
+++ branches/prepare-0.9.10/src/daemon/main.c Fri Mar 28 19:09:25 2008
@@ -779,7 +779,7 @@
     c->disallow_module_loading = !!conf->disallow_module_loading;
 
     if (r < 0 && conf->fail) {
-        pa_log("failed to initialize daemon.");
+        pa_log("Failed to initialize daemon.");
 #ifdef HAVE_FORK
         if (conf->daemonize)
             pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL);
@@ -793,16 +793,19 @@
     } else {
 
         retval = 0;
+
+        if (c->default_sink_name &&
+            pa_namereg_get(c, c->default_sink_name, PA_NAMEREG_SINK, 1) == NULL) {
+            pa_log_error("%s : Default sink name (%s) does not exist in name register.", __FILE__, c->default_sink_name);
+            retval = !!conf->fail;
+        }
+
 #ifdef HAVE_FORK
         if (conf->daemonize)
             pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL);
 #endif
 
-        if (c->default_sink_name &&
-            pa_namereg_get(c, c->default_sink_name, PA_NAMEREG_SINK, 1) == NULL) {
-            pa_log_error("%s : Fatal error. Default sink name (%s) does not exist in name register.", __FILE__, c->default_sink_name);
-            retval = 1;
-        } else {
+        if (!retval) {
             pa_log_info("Daemon startup complete.");
             if (pa_mainloop_run(mainloop, &retval) < 0)
                 retval = 1;




More information about the pulseaudio-commits mailing list