summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DabMux.cpp15
-rw-r--r--src/utils.cpp2
2 files changed, 15 insertions, 2 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index 08a3c15..47e92c6 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -351,7 +351,20 @@ int main(int argc, char *argv[])
bool MNSC_increment_time = false;
try {
- if (argc > 1 && strncmp(argv[1], "-e", 2) == 0) { // use external config file
+ if (argc == 1) { // Assume the only argument is a config file
+ string conf_file = argv[1];
+
+ try {
+ parse_configfile(conf_file, outputs, ensemble, &enableTist, &FICL,
+ &factumAnalyzer, &limit, &rc, &statsserverport, &edi_conf);
+ }
+ catch (runtime_error &e) {
+ etiLog.log(error, "Configuration file parsing error: %s\n",
+ e.what());
+ throw MuxInitException();
+ }
+ }
+ else if (argc > 1 && strncmp(argv[1], "-e", 2) == 0) { // use external config file
try {
if (argc != 3) {
diff --git a/src/utils.cpp b/src/utils.cpp
index 85f42d2..ee447d3 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -152,7 +152,7 @@ void printUsage(char *name, FILE* out)
fprintf(out, "\nSYNOPSYS\n");
fprintf(out, " You can use either a configuration file, or the command line arguments\n");
fprintf(out, " With external configuration file:\n");
- fprintf(out, " %s -e configuration.mux\n", name);
+ fprintf(out, " %s [-e] configuration.mux\n", name);
fprintf(out, " See doc/example.config for an example format for the configuration file\n");
fprintf(out, " With command line arguments:\n");
fprintf(out, " %s"