1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-11-03 04:17:17 -05:00

Feature: Allow using default config filename.

This uses the new configure option --with-default-config=PATH.
This commit is contained in:
Philipp Schafft 2018-06-16 17:33:14 +00:00
parent 452c2b17d3
commit 2b3f07e9b0

View File

@ -168,7 +168,13 @@ static int _parse_config_opts(int argc, char **argv, char *filename, size_t size
int config_ok = 0; int config_ok = 0;
background = 0; background = 0;
if (argc < 2) return -1; if (argc < 2) {
if (filename[0] != 0) {
return 1;
} else {
return -1;
}
}
while (i < argc) { while (i < argc) {
if (strcmp(argv[i], "-b") == 0) { if (strcmp(argv[i], "-b") == 0) {
@ -493,7 +499,11 @@ int main(int argc, char **argv)
#endif #endif
{ {
int res, ret; int res, ret;
char filename[512]; #ifdef ICECAST_DEFAULT_CONFIG
char filename[512] = ICECAST_DEFAULT_CONFIG;
#else
char filename[512] = "";
#endif
char pbuf[1024]; char pbuf[1024];
/* parse the '-c icecast.xml' option /* parse the '-c icecast.xml' option