mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
bail out if no sink is defined
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@350 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
b993e33cce
commit
c57cad926c
1 changed files with 10 additions and 4 deletions
14
polyp/main.c
14
polyp/main.c
|
|
@ -58,6 +58,7 @@
|
|||
#include "caps.h"
|
||||
#include "cli-text.h"
|
||||
#include "pid.h"
|
||||
#include "namereg.h"
|
||||
|
||||
#ifdef HAVE_LIBWRAP
|
||||
/* Only one instance of these variables */
|
||||
|
|
@ -332,11 +333,16 @@ int main(int argc, char *argv[]) {
|
|||
c->module_idle_time = conf->module_idle_time;
|
||||
c->scache_idle_time = conf->scache_idle_time;
|
||||
c->resample_method = conf->resample_method;
|
||||
|
||||
pa_log_info(__FILE__": Daemon startup complete.\n");
|
||||
if (pa_mainloop_run(mainloop, &retval) < 0)
|
||||
|
||||
if (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.\n", __FILE__, c->default_sink_name);
|
||||
retval = 1;
|
||||
pa_log_info(__FILE__": Daemon shutdown initiated.\n");
|
||||
} else {
|
||||
pa_log_info(__FILE__": Daemon startup complete.\n");
|
||||
if (pa_mainloop_run(mainloop, &retval) < 0)
|
||||
retval = 1;
|
||||
pa_log_info(__FILE__": Daemon shutdown initiated.\n");
|
||||
}
|
||||
}
|
||||
|
||||
pa_core_free(c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue