From 9f745033c65bfd0f8c1a95548d5253d5368c31a5 Mon Sep 17 00:00:00 2001 From: Lars Hanisch Date: Wed, 22 Jun 2011 23:38:15 +0200 Subject: leave eight additional slots free if mcli-plugin is loaded --- HISTORY | 4 ++++ dynamite.c | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index e8d63c3..85f939d 100644 --- a/HISTORY +++ b/HISTORY @@ -148,3 +148,7 @@ VDR Plugin 'dynamite' Revision History 2011-06-15: Version 0.0.6d - add udev property "dynamite_cardindex" to attach a device at a preferred slot (if free) + +2011-06-22: Version 0.0.6e + +- leave eight additional slots free if mcli-plugin is loaded diff --git a/dynamite.c b/dynamite.c index aeaf513..df5719e 100644 --- a/dynamite.c +++ b/dynamite.c @@ -10,7 +10,7 @@ #include "menu.h" #include "monitor.h" -static const char *VERSION = "0.0.6d"; +static const char *VERSION = "0.0.6e"; static const char *DESCRIPTION = tr("attach/detach devices on the fly"); static const char *MAINMENUENTRY = NULL; @@ -195,12 +195,13 @@ bool cPluginDynamite::ProcessArgs(int argc, char *argv[]) bool cPluginDynamite::Initialize(void) { - static const char *badPlugins[] = {"streamdev-client", NULL}; + static const char *badPlugins[] = {"streamdev-client", "mcli", NULL}; + static int badPluginsFreeCount[] = {1, 8}; int freeSlotsForKnownBadPlugins = 0; for (int i = 0; badPlugins[i]; i++) { if (cPluginManager::GetPlugin(badPlugins[i]) != NULL) { - isyslog("dynamite: %s detected, leaving one additional slot free", badPlugins[i]); - freeSlotsForKnownBadPlugins++; + isyslog("dynamite: %s detected, leaving %d additional slot(s) free", badPlugins[i], badPluginsFreeCount[i]); + freeSlotsForKnownBadPlugins+= badPluginsFreeCount[i]; } } // create dynamic devices -- cgit v1.2.3