Commit 04702a0d authored by Stefano Sabatini's avatar Stefano Sabatini

ffserver: add some error handling to main()

parent 3adb8256
...@@ -4679,6 +4679,7 @@ static const OptionDef options[] = { ...@@ -4679,6 +4679,7 @@ static const OptionDef options[] = {
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
struct sigaction sigact = { { 0 } }; struct sigaction sigact = { { 0 } };
int ret = 0;
config_filename = av_strdup("/etc/ffserver.conf"); config_filename = av_strdup("/etc/ffserver.conf");
...@@ -4700,8 +4701,9 @@ int main(int argc, char **argv) ...@@ -4700,8 +4701,9 @@ int main(int argc, char **argv)
sigact.sa_flags = SA_NOCLDSTOP | SA_RESTART; sigact.sa_flags = SA_NOCLDSTOP | SA_RESTART;
sigaction(SIGCHLD, &sigact, 0); sigaction(SIGCHLD, &sigact, 0);
if (parse_ffconfig(config_filename) < 0) { if ((ret = parse_ffconfig(config_filename)) < 0) {
fprintf(stderr, "Incorrect config file - exiting.\n"); fprintf(stderr, "Error reading configuration file '%s': %s\n",
config_filename, av_err2str(ret));
exit(1); exit(1);
} }
av_freep(&config_filename); av_freep(&config_filename);
......
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