diff options
author | Lars Hanisch <dvb@flensrocker.de> | 2011-04-06 22:53:08 +0200 |
---|---|---|
committer | Lars Hanisch <dvb@flensrocker.de> | 2011-04-06 22:53:08 +0200 |
commit | d026becc3e77c0881093dab129a4c2c984494256 (patch) | |
tree | b91d1c968e38590afd9919a07b43f690b471c5cb | |
parent | 90297b1053cdb81be59a69cbee6681d2bbff7bda (diff) | |
download | vdr-plugin-dynamite-d026becc3e77c0881093dab129a4c2c984494256.tar.gz vdr-plugin-dynamite-d026becc3e77c0881093dab129a4c2c984494256.tar.bz2 |
autodetect streamdev-client and leave one slot free if present
-rw-r--r-- | dynamite.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -189,10 +189,18 @@ bool cPluginDynamite::ProcessArgs(int argc, char *argv[]) bool cPluginDynamite::Initialize(void) { + static const char *badPlugins[] = {"streamdev-client", NULL}; + 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++; + } + } // create dynamic devices - if (cDevice::NumDevices() < (MAXDEVICES - freeDeviceSlots)) { + if (cDevice::NumDevices() < (MAXDEVICES - freeDeviceSlots - freeSlotsForKnownBadPlugins)) { isyslog("dynamite: creating dynamic device slots as much as possible"); - while (cDevice::NumDevices() < (MAXDEVICES - freeDeviceSlots)) + while (cDevice::NumDevices() < (MAXDEVICES - freeDeviceSlots - freeSlotsForKnownBadPlugins)) new cDynamicDevice; } // look for all dvb devices |