From cded21d8e46baffc08e5164d195c184d9dd238b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Thu, 22 Nov 2007 20:48:56 +0000 Subject: [PATCH] let http server be default on, and make it possible to change listen port from the config --- main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index ce63436f..5b5cb52e 100644 --- a/main.c +++ b/main.c @@ -108,11 +108,11 @@ main(int argc, char **argv) char *cfgfile = NULL; int logfacility = LOG_DAEMON; int disable_dvb = 0; - int http_port = 0; + int p; signal(SIGPIPE, handle_sigpipe); - while((c = getopt(argc, argv, "c:fu:g:dh:")) != -1) { + while((c = getopt(argc, argv, "c:fu:g:d")) != -1) { switch(c) { case 'd': disable_dvb = 1; @@ -129,9 +129,6 @@ main(int argc, char **argv) case 'g': groupnam = optarg; break; - case 'h': - http_port = atoi(optarg); - break; } } @@ -188,8 +185,6 @@ main(int argc, char **argv) epg_init(); xmltv_init(); - pvr_init(); - subscriptions_init(); htmlui_start(); @@ -202,10 +197,13 @@ main(int argc, char **argv) syslog(LOG_NOTICE, "Initial input setup completed, starting output modules"); + pvr_init(); output_multicast_setup(); client_start(); - if(http_port) - http_start(http_port); + + p = atoi(config_get_str("http-server-port", "9980")); + if(p) + http_start(p); } dispatcher();