From 0eecfaaf275b826e2c386a138340dcdb35d6a31c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 11 Feb 2020 23:47:24 +0100 Subject: [PATCH] neutrino: try to fix reading ci-settings for cst hardware Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/bb3a1e847fe9106205caba8bb3dd0d46a70cf2d3 Author: vanhofen Date: 2020-02-11 (Tue, 11 Feb 2020) Origin message was: ------------------ - neutrino: try to fix reading ci-settings for cst hardware --- src/neutrino.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index c4e4e691c..f1db51363 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -485,7 +485,16 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.ci_delay = configfile.getInt32("ci_delay", 256); #endif // ci-settings for each slot - for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++) { + unsigned int ci_slots = cCA::GetInstance()->GetNumberCISlots(); + if (strcmp(g_info.hw_caps->boxvendor, "Coolstream") == 0) + { + /* + CST hardware isn't initialized here, + so we assume one ci-slot (two for HD1 BSE). + */ + ci_slots = (strcmp(g_info.hw_caps->boxname, "HD1") == 0) ? 2 : 1; + } + for (unsigned int i = 0; i < ci_slots; i++) { sprintf(cfg_key, "ci_ignore_messages_%d", i); g_settings.ci_ignore_messages[i] = configfile.getInt32(cfg_key, 0); sprintf(cfg_key, "ci_save_pincode_%d", i);