Added a separate trace mode for server discovery.

This commit is contained in:
Rolf Ahrenberg 2015-01-14 21:25:43 +02:00
parent 09e6c272cd
commit 3b9269e9de
3 changed files with 4 additions and 4 deletions

2
log.h
View File

@ -34,7 +34,7 @@
#define debug10(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug10) ? dsyslog("SATIP10: " x) : void() )
// 0x0400: CI
#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() )
// 0x1000: TBD
#define debug13(x...) void( SatipConfig.IsTraceMode(cSatipConfig::eTraceModeDebug13) ? dsyslog("SATIP13: " x) : void() )

View File

@ -59,12 +59,12 @@ void cSatipMsearch::Process(void)
int length;
while ((length = Read(bufferM, bufferLenM)) > 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;
char *s, *p = reinterpret_cast<char *>(bufferM), *location = NULL;
char *r = strtok_r(p, "\r\n", &s);
while (r) {
debug3("%s r=%s", __PRETTY_FUNCTION__, r);
debug12("%s r=%s", __PRETTY_FUNCTION__, r);
// Check the status code
// HTTP/1.1 200 OK
if (!status && startswith(r, "HTTP/1.1 200 OK"))

View File

@ -277,7 +277,7 @@ int cPluginSatip::ParseFilters(const char *valueP, int *filtersP)
while (valueP && *valueP && (n < SECTION_FILTER_TABLE_SIZE)) {
strn0cpy(buffer, valueP, sizeof(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)
filtersP[n++] = i;
if ((valueP = strchr(valueP, ' ')) != NULL)