diff --git a/dump1090.c b/dump1090.c index d5c3111..7db63b4 100644 --- a/dump1090.c +++ b/dump1090.c @@ -603,6 +603,15 @@ int main(int argc, char **argv) { } } + if (Modes.sdr_type == SDR_NONE && !Modes.net) { + fprintf(stderr, + "No SDR available and network mode not enabled; nothing to do!\n" + "Select a SDR type (--device-type or --ifile), or enable network mode (--net)\n" + "Try %s --help for full option help.\n", + argv[0]); + exit(1); + } + #ifdef _WIN32 // Try to comply with the Copyright license conditions for binary distribution if (!Modes.quiet) {showCopyright();} diff --git a/sdr.c b/sdr.c index 2a5da96..41e3ef2 100644 --- a/sdr.c +++ b/sdr.c @@ -98,8 +98,8 @@ static sdr_handler sdr_handlers[] = { { "limesdr", SDR_LIMESDR, limesdrInitConfig, limesdrShowHelp, limesdrHandleOption, limesdrOpen, limesdrRun, limesdrClose }, #endif - { "ifile", SDR_IFILE, ifileInitConfig, ifileShowHelp, ifileHandleOption, ifileOpen, ifileRun, ifileClose }, { "none", SDR_NONE, noInitConfig, noShowHelp, noHandleOption, noOpen, noRun, noClose }, + { "ifile", SDR_IFILE, ifileInitConfig, ifileShowHelp, ifileHandleOption, ifileOpen, ifileRun, ifileClose }, { NULL, SDR_NONE, NULL, NULL, NULL, NULL, NULL, NULL } /* must come last */ };