From af383eb37102de787a1f0266e144839ac762601d Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Sat, 12 Sep 2015 12:52:04 +0200 Subject: [PATCH] Complain about missing default mapping file --- src/config.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/config.c b/src/config.c index 399c1cd..225bbe4 100644 --- a/src/config.c +++ b/src/config.c @@ -317,8 +317,13 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) { config->stream.bitrate = 5000; } - if (inputAdded && !mapped) { - fprintf(stderr, "Mapping option should be followed by the input to be mapped.\n"); - exit(-1); + if (inputAdded) { + if (!mapped) { + fprintf(stderr, "Mapping option should be followed by the input to be mapped.\n"); + exit(-1); + } else if (config->mapping == NULL) { + fprintf(stderr, "Please specify mapping file as default mapping could not be found.\n"); + exit(-1); + } } }