Updated the server info message to show used quirks.

This commit is contained in:
Rolf Ahrenberg 2015-01-27 16:27:23 +02:00
parent 73ed299ed9
commit 3e4b1c0383
3 changed files with 25 additions and 15 deletions

View File

@ -242,7 +242,7 @@ void cSatipDiscover::AddServer(const char *addrP, const char *modelP, const char
cString desc = cString::sprintf("%s #%d", !isempty(descP) ? descP : "MyBrokenHardware", n++);
cSatipServer *tmp = new cSatipServer(addrP, r, desc);
if (!serversM.Update(tmp)) {
info("Adding server '%s|%s|%s'%s%s", tmp->Address(), tmp->Model(), tmp->Description(), tmp->HasCI() ? " providing CI" : "", tmp->HasQuirk() ? " (malfunctioning firmware!)" : "");
info("Adding server '%s|%s|%s' CI: %s Quirks: %s", tmp->Address(), tmp->Model(), tmp->Description(), tmp->HasCI() ? "yes" : "no", tmp->HasQuirk() ? tmp->Quirks() : "none");
serversM.Add(tmp);
}
else
@ -254,7 +254,7 @@ void cSatipDiscover::AddServer(const char *addrP, const char *modelP, const char
else {
cSatipServer *tmp = new cSatipServer(addrP, modelP, descP);
if (!serversM.Update(tmp)) {
info("Adding server '%s|%s|%s'%s%s", tmp->Address(), tmp->Model(), tmp->Description(), tmp->HasCI() ? " providing CI" : "", tmp->HasQuirk() ? " (malfunctioning firmware!)" : "");
info("Adding server '%s|%s|%s' CI: %s Quirks: %s", tmp->Address(), tmp->Model(), tmp->Description(), tmp->HasCI() ? "yes" : "no", tmp->HasQuirk() ? tmp->Quirks() : "none");
serversM.Add(tmp);
}
else

View File

@ -72,29 +72,37 @@ cSatipServer::cSatipServer(const char *addressP, const char *modelP, const char
: addressM((addressP && *addressP) ? addressP : "0.0.0.0"),
modelM((modelP && *modelP) ? modelP : "DVBS-1"),
descriptionM(!isempty(descriptionP) ? descriptionP : "MyBrokenHardware"),
quirksM(""),
quirkM(eSatipQuirkNone),
hasCiM(false),
createdM(time(NULL)),
lastSeenM(0)
{
if (!SatipConfig.GetDisableServerQuirks()) {
debug3("%s quirks=%s", __PRETTY_FUNCTION__, *descriptionM);
// These devices contain a session id bug:
// Inverto Airscreen Server IDL 400 ?
// Elgato EyeTV Netstream 4Sat ?
if (strstr(*descriptionM, "GSSBOX") || // Grundig Sat Systems GSS.box DSI 400
strstr(*descriptionM, "DIGIBIT") || // Telestar Digibit R1
strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400
)
) {
quirkM |= eSatipQuirkSessionId;
quirksM = cString::sprintf("%s%sSessionId", *quirksM, isempty(*quirksM) ? "" : ",");
}
// These devices contain a play (add/delpids) parameter bug:
if (strstr(*descriptionM, "fritzdvbc")) // Fritz!WLAN Repeater DVB-C
if (strstr(*descriptionM, "fritzdvbc") // Fritz!WLAN Repeater DVB-C
) {
quirkM |= eSatipQuirkPlayPids;
quirksM = cString::sprintf("%s%sPlayPids", *quirksM, isempty(*quirksM) ? "" : ",");
}
// These devices contain a frontend locking bug:
if (strstr(*descriptionM, "fritzdvbc") || // Fritz!WLAN Repeater DVB-C
strstr(*descriptionM, "Triax SatIP Converter") // Triax TSS 400
)
) {
quirkM |= eSatipQuirkForceLock;
quirksM = cString::sprintf("%s%sForceLock", *quirksM, isempty(*quirksM) ? "" : ",");
}
debug3("%s description=%s quirks=%s", __PRETTY_FUNCTION__, *descriptionM, *quirksM);
}
// These devices support the X_PMT protocol extension
if (strstr(*descriptionM, "OctopusNet")) // Digital Devices OctopusNet

View File

@ -54,6 +54,7 @@ private:
cString addressM;
cString modelM;
cString descriptionM;
cString quirksM;
cSatipFrontends frontendsM[eSatipFrontendCount];
int quirkM;
bool hasCiM;
@ -80,15 +81,16 @@ public:
int GetModulesDVBT2(void);
int GetModulesDVBC(void);
int GetModulesDVBC2(void);
const char *Address() { return *addressM; }
const char *Model(void) { return *modelM; }
const char *Description() { return *descriptionM; }
bool Quirk(int quirkP) { return ((quirkP & eSatipQuirkMask) & quirkM); }
bool HasQuirk(void) { return !!quirkM; }
bool HasCI(void) { return hasCiM; }
void Update(void) { lastSeenM.Set(); }
uint64_t LastSeen(void) { return lastSeenM.Elapsed(); }
time_t Created(void) { return createdM; }
const char *Address(void) { return *addressM; }
const char *Model(void) { return *modelM; }
const char *Description(void) { return *descriptionM; }
const char *Quirks(void) { return *quirksM; }
bool Quirk(int quirkP) { return ((quirkP & eSatipQuirkMask) & quirkM); }
bool HasQuirk(void) { return (quirkM != eSatipQuirkNone); }
bool HasCI(void) { return hasCiM; }
void Update(void) { lastSeenM.Set(); }
uint64_t LastSeen(void) { return lastSeenM.Elapsed(); }
time_t Created(void) { return createdM; }
};
// --- cSatipServers ----------------------------------------------------------