[xiph-cvs] cvs commit: icecast/src main.c

Michael Smith msmith at xiph.org
Sat Aug 24 23:12:52 PDT 2002



msmith      02/08/25 02:12:51

  Modified:    src      main.c
  Log:
  Move fserve_initialize() to later so that chroot() works right.

Revision  Changes    Path
1.18      +4 -5      icecast/src/main.c

Index: main.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/main.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- main.c	18 Aug 2002 08:49:25 -0000	1.17
+++ main.c	25 Aug 2002 06:12:51 -0000	1.18
@@ -60,7 +60,6 @@
         global_initialize();
         refbuf_initialize();
     xslt_initialize();
-    fserve_initialize();
 }
 
 static void _shutdown_subsystems(void)
@@ -265,14 +264,14 @@
         int res, ret;
         char filename[256];
 
-	/* startup all the modules */
-	_initialize_subsystems();
-
         /* parse the '-c icecast.xml' option
         ** only, so that we can read a configfile
         */
         res = _parse_config_file(argc, argv, filename, 256);
         if (res == 1) {
+	    /* startup all the modules */
+    	_initialize_subsystems();
+
                 /* parse the config file */
                 ret = config_parse_file(filename);
                 if (ret < 0) {
@@ -296,7 +295,6 @@
                 }
         } else if (res == -1) {
                 _print_usage();
-		_shutdown_subsystems();
                 return 1;
         }
         
@@ -313,6 +311,7 @@
     _ch_root_uid_setup(); /* Change user id and root if requested/possible */
 
     stats_initialize(); /* We have to do this later on because of threading */
+    fserve_initialize(); /* This too */
 
 #ifdef CHUID 
     /* We'll only have getuid() if we also have setuid(), it's reasonable to

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list