Commit 2b3f07e9 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Feature: Allow using default config filename.

This uses the new configure option --with-default-config=PATH.
parent 452c2b17
......@@ -168,7 +168,13 @@ static int _parse_config_opts(int argc, char **argv, char *filename, size_t size
int config_ok = 0;
background = 0;
if (argc < 2) return -1;
if (argc < 2) {
if (filename[0] != 0) {
return 1;
} else {
return -1;
}
}
while (i < argc) {
if (strcmp(argv[i], "-b") == 0) {
......@@ -493,7 +499,11 @@ int main(int argc, char **argv)
#endif
{
int res, ret;
char filename[512];
#ifdef ICECAST_DEFAULT_CONFIG
char filename[512] = ICECAST_DEFAULT_CONFIG;
#else
char filename[512] = "";
#endif
char pbuf[1024];
/* parse the '-c icecast.xml' option
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment