1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-30 06:35:23 +00:00

small cleanup and don't shutdown curl too early

svn path=/trunk/icecast/; revision=5860
This commit is contained in:
Karl Heyes 2004-02-24 21:02:44 +00:00
parent 176804e436
commit dac1cf97dc

View File

@ -76,12 +76,13 @@ static void _fatal_error(char *perr)
static void _print_usage() static void _print_usage()
{ {
printf(ICECAST_VERSION_STRING "\n\n");
printf("usage: icecast [-h -b -v] -c <file>\n"); printf("usage: icecast [-h -b -v] -c <file>\n");
printf("options:\n"); printf("options:\n");
printf("\t-c <file>\tSpecify configuration file\n"); printf("\t-c <file>\tSpecify configuration file\n");
printf("\t-h\t\tDisplay usage\n"); printf("\t-h\t\tDisplay usage\n");
printf("\t-v\t\tDisplay version info\n"); printf("\t-v\t\tDisplay version info\n");
printf("\t-b\t\tRun icecast in the background\n"); printf("\t-b\t\tRun icecast in the background\n");
printf("\n"); printf("\n");
} }
@ -109,14 +110,14 @@ static void _initialize_subsystems(void)
static void _shutdown_subsystems(void) static void _shutdown_subsystems(void)
{ {
#ifdef USE_YP
curl_shutdown();
#endif
fserve_shutdown(); fserve_shutdown();
xslt_shutdown(); xslt_shutdown();
refbuf_shutdown(); refbuf_shutdown();
slave_shutdown(); slave_shutdown();
stats_shutdown(); stats_shutdown();
#ifdef USE_YP
curl_shutdown();
#endif
/* Now that these are done, we can stop the loggers. */ /* Now that these are done, we can stop the loggers. */
_stop_logging(); _stop_logging();
@ -142,17 +143,18 @@ static int _parse_config_file(int argc, char **argv, char *filename, int size)
while (i < argc) { while (i < argc) {
if (strcmp(argv[i], "-b") == 0) { if (strcmp(argv[i], "-b") == 0) {
#ifndef WIN32 #ifndef WIN32
fprintf(stdout, "Starting icecast2\nDetaching from the console\n"); fprintf(stdout, "Starting icecast2\nDetaching from the console\n");
if ((processID = (int)fork()) > 0) { if ((processID = (int)fork()) > 0) {
/* exit the parent */ /* exit the parent */
_exit(0); _exit(0);
} }
#endif #endif
} }
if (strcmp(argv[i], "-v") == 0) { if (strcmp(argv[i], "-v") == 0) {
fprintf(stdout, "%s\n", ICECAST_VERSION_STRING); fprintf(stdout, "%s\n", ICECAST_VERSION_STRING);
exit(0); exit(0);
} }
if (strcmp(argv[i], "-c") == 0) { if (strcmp(argv[i], "-c") == 0) {
if (i + 1 < argc) { if (i + 1 < argc) {
strncpy(filename, argv[i + 1], size-1); strncpy(filename, argv[i + 1], size-1);
@ -452,7 +454,7 @@ int main(int argc, char **argv)
} }
} }
INFO0("icecast server started"); INFO0 (ICECAST_VERSION_STRING " server started");
/* REM 3D Graphics */ /* REM 3D Graphics */
@ -483,16 +485,3 @@ int main(int argc, char **argv)
} }