diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-11-17 15:42:50 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-11-17 15:42:50 +0100 |
commit | 6dadbaba8a37579f3f7a1c912cf48d4d0964a450 (patch) | |
tree | 9e266f79029a76e7bb4ceb4d2ff9779cd2494fe8 /src/DabMux.cpp | |
parent | cb495ca5dd7773dc07cbc44cfa72067abd59b9dc (diff) | |
download | dabmux-6dadbaba8a37579f3f7a1c912cf48d4d0964a450.tar.gz dabmux-6dadbaba8a37579f3f7a1c912cf48d4d0964a450.tar.bz2 dabmux-6dadbaba8a37579f3f7a1c912cf48d4d0964a450.zip |
Make -e optional
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r-- | src/DabMux.cpp | 15 |
1 files changed, 14 insertions, 1 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) { |