diff --git a/host/include/interface/capture.h b/host/include/interface/capture.h index 90196bbc..e3e969b4 100644 --- a/host/include/interface/capture.h +++ b/host/include/interface/capture.h @@ -112,6 +112,8 @@ typedef struct CaptureInterface { const char * shortName; const bool asyncCapture; + const bool deprecated; + const char * (*getName )(void); void (*initOptions )(void); diff --git a/host/src/app.c b/host/src/app.c index 19496dab..b052c1a9 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -894,8 +894,18 @@ int app_main(int argc, char * argv[]) CaptureInterface * iface = NULL; for(int i = 0; CaptureInterfaces[i]; ++i) { - if (*ifaceName && strcasecmp(ifaceName, CaptureInterfaces[i]->shortName)) - continue; + if (*ifaceName) + { + if (strcasecmp(ifaceName, CaptureInterfaces[i]->shortName) != 0) + continue; + } + else + { + /* do not try to init deprecated interfaces unless they are explicity + selected in the host configuration */ + if (CaptureInterfaces[i]->deprecated) + continue; + } iface = CaptureInterfaces[i]; DEBUG_INFO("Trying : %s", iface->getName());