]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
let http server be default on, and make it possible to change listen port from the...
authorAndreas Öman <andreas@lonelycoder.com>
Thu, 22 Nov 2007 20:48:56 +0000 (20:48 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Thu, 22 Nov 2007 20:48:56 +0000 (20:48 +0000)
main.c

diff --git a/main.c b/main.c
index ce63436f64622fd3f8b888a0640ddd75f7a16928..5b5cb52ebed5096f73980d858c77c7fcb83d105e 100644 (file)
--- 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();