mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Added a separate trace mode for server discovery.
This commit is contained in:
parent
09e6c272cd
commit
3b9269e9de
2
log.h
2
log.h
@ -34,7 +34,7 @@
|
|||||||
#define debug10(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug10) ? dsyslog("SATIP10: " x) : void() )
|
#define debug10(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug10) ? dsyslog("SATIP10: " x) : void() )
|
||||||
// 0x0400: CI
|
// 0x0400: CI
|
||||||
#define debug11(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug11) ? dsyslog("SATIP11: " x) : void() )
|
#define debug11(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug11) ? dsyslog("SATIP11: " x) : void() )
|
||||||
// 0x0800: TBD
|
// 0x0800: Discovery
|
||||||
#define debug12(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug12) ? dsyslog("SATIP12: " x) : void() )
|
#define debug12(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug12) ? dsyslog("SATIP12: " x) : void() )
|
||||||
// 0x1000: TBD
|
// 0x1000: TBD
|
||||||
#define debug13(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug13) ? dsyslog("SATIP13: " x) : void() )
|
#define debug13(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug13) ? dsyslog("SATIP13: " x) : void() )
|
||||||
|
@ -59,12 +59,12 @@ void cSatipMsearch::Process(void)
|
|||||||
int length;
|
int length;
|
||||||
while ((length = Read(bufferM, bufferLenM)) > 0) {
|
while ((length = Read(bufferM, bufferLenM)) > 0) {
|
||||||
bufferM[min(length, int(bufferLenM - 1))] = 0;
|
bufferM[min(length, int(bufferLenM - 1))] = 0;
|
||||||
debug3("%s len=%d buf=%s", __PRETTY_FUNCTION__, length, bufferM);
|
debug12("%s len=%d buf=%s", __PRETTY_FUNCTION__, length, bufferM);
|
||||||
bool status = false, valid = false;
|
bool status = false, valid = false;
|
||||||
char *s, *p = reinterpret_cast<char *>(bufferM), *location = NULL;
|
char *s, *p = reinterpret_cast<char *>(bufferM), *location = NULL;
|
||||||
char *r = strtok_r(p, "\r\n", &s);
|
char *r = strtok_r(p, "\r\n", &s);
|
||||||
while (r) {
|
while (r) {
|
||||||
debug3("%s r=%s", __PRETTY_FUNCTION__, r);
|
debug12("%s r=%s", __PRETTY_FUNCTION__, r);
|
||||||
// Check the status code
|
// Check the status code
|
||||||
// HTTP/1.1 200 OK
|
// HTTP/1.1 200 OK
|
||||||
if (!status && startswith(r, "HTTP/1.1 200 OK"))
|
if (!status && startswith(r, "HTTP/1.1 200 OK"))
|
||||||
|
2
satip.c
2
satip.c
@ -277,7 +277,7 @@ int cPluginSatip::ParseFilters(const char *valueP, int *filtersP)
|
|||||||
while (valueP && *valueP && (n < SECTION_FILTER_TABLE_SIZE)) {
|
while (valueP && *valueP && (n < SECTION_FILTER_TABLE_SIZE)) {
|
||||||
strn0cpy(buffer, valueP, sizeof(buffer));
|
strn0cpy(buffer, valueP, sizeof(buffer));
|
||||||
int i = atoi(buffer);
|
int i = atoi(buffer);
|
||||||
debug3(":%s filters[%d]=%d", __PRETTY_FUNCTION__, n, i);
|
debug3("%s filters[%d]=%d", __PRETTY_FUNCTION__, n, i);
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
filtersP[n++] = i;
|
filtersP[n++] = i;
|
||||||
if ((valueP = strchr(valueP, ' ')) != NULL)
|
if ((valueP = strchr(valueP, ' ')) != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user