1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

Fixed the device discovery.

This commit is contained in:
Rolf Ahrenberg 2014-04-24 20:04:43 +03:00
parent 78ef582bea
commit fbbfdfab2b
7 changed files with 40 additions and 24 deletions

View File

@ -50,3 +50,7 @@ VDR Plugin 'satip' Revision History
2014-04-20: Version 0.3.0
- Tweaked the pid update mechanism.
2014-04-27: Version 0.3.1
- Fixed the device discovery.

View File

@ -179,7 +179,7 @@ void cSatipDiscover::Read(void)
int len = socketM->Read(buf, eProbeBufferSize);
if (len > 0) {
//debug("cSatipDiscover::%s(): len=%d", __FUNCTION__, len);
bool status = false;
bool status = false, valid = false;
char *s, *p = reinterpret_cast<char *>(buf), *location = NULL;
char *r = strtok_r(p, "\r\n", &s);
while (r) {
@ -189,16 +189,28 @@ void cSatipDiscover::Read(void)
if (!status && startswith(r, "HTTP/1.1 200 OK")) {
status = true;
}
if (status) {
// Check the location data
// LOCATION: http://192.168.0.115:8888/octonet.xml
if (status && startswith(r, "LOCATION:")) {
if (startswith(r, "LOCATION:")) {
location = compactspace(r + 9);
debug("cSatipDiscover::%s(): location='%s'", __FUNCTION__, location);
}
// Check the source type
// ST: urn:ses-com:device:SatIPServer:1
else if (startswith(r, "ST:")) {
char *st = compactspace(r + 3);
if (strstr(st, "urn:ses-com:device:SatIPServer:1"))
valid = true;
debug("cSatipDiscover::%s(): st='%s'", __FUNCTION__, st);
}
// Check whether all the required data is found
if (valid && !isempty(location))
break;
}
r = strtok_r(NULL, "\r\n", &s);
}
if (handleM && !isempty(location)) {
if (handleM && valid && !isempty(location)) {
long rc = 0;
CURLcode res = CURLE_OK;
#ifdef DEBUG

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.0\n"
"Project-Id-Version: vdr-satip 0.3.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-04-20 04:20+0200\n"
"PO-Revision-Date: 2014-04-20 04:20+0200\n"
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
"Language-Team: Catalan <vdr@linuxtv.org>\n"
"Language: ca\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.0\n"
"Project-Id-Version: vdr-satip 0.3.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-04-20 04:20+0200\n"
"PO-Revision-Date: 2014-04-20 04:20+0200\n"
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
"Language-Team: German <vdr@linuxtv.org>\n"
"Language: de\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.0\n"
"Project-Id-Version: vdr-satip 0.3.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-04-20 04:20+0200\n"
"PO-Revision-Date: 2014-04-20 04:20+0200\n"
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
"Language-Team: Spanish <vdr@linuxtv.org>\n"
"Language: es\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 0.3.0\n"
"Project-Id-Version: vdr-satip 0.3.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-04-20 04:20+0200\n"
"PO-Revision-Date: 2014-04-20 04:20+0200\n"
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
"Language: fi\n"

View File

@ -25,7 +25,7 @@
#define GITVERSION ""
#endif
const char VERSION[] = "0.3.0" GITVERSION;
const char VERSION[] = "0.3.1" GITVERSION;
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
class cPluginSatip : public cPlugin {