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:
parent
78ef582bea
commit
fbbfdfab2b
4
HISTORY
4
HISTORY
@ -50,3 +50,7 @@ VDR Plugin 'satip' Revision History
|
|||||||
2014-04-20: Version 0.3.0
|
2014-04-20: Version 0.3.0
|
||||||
|
|
||||||
- Tweaked the pid update mechanism.
|
- Tweaked the pid update mechanism.
|
||||||
|
|
||||||
|
2014-04-27: Version 0.3.1
|
||||||
|
|
||||||
|
- Fixed the device discovery.
|
||||||
|
18
discover.c
18
discover.c
@ -179,7 +179,7 @@ void cSatipDiscover::Read(void)
|
|||||||
int len = socketM->Read(buf, eProbeBufferSize);
|
int len = socketM->Read(buf, eProbeBufferSize);
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
//debug("cSatipDiscover::%s(): len=%d", __FUNCTION__, len);
|
//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 *s, *p = reinterpret_cast<char *>(buf), *location = NULL;
|
||||||
char *r = strtok_r(p, "\r\n", &s);
|
char *r = strtok_r(p, "\r\n", &s);
|
||||||
while (r) {
|
while (r) {
|
||||||
@ -189,16 +189,28 @@ void cSatipDiscover::Read(void)
|
|||||||
if (!status && startswith(r, "HTTP/1.1 200 OK")) {
|
if (!status && startswith(r, "HTTP/1.1 200 OK")) {
|
||||||
status = true;
|
status = true;
|
||||||
}
|
}
|
||||||
|
if (status) {
|
||||||
// Check the location data
|
// Check the location data
|
||||||
// LOCATION: http://192.168.0.115:8888/octonet.xml
|
// LOCATION: http://192.168.0.115:8888/octonet.xml
|
||||||
if (status && startswith(r, "LOCATION:")) {
|
if (startswith(r, "LOCATION:")) {
|
||||||
location = compactspace(r + 9);
|
location = compactspace(r + 9);
|
||||||
debug("cSatipDiscover::%s(): location='%s'", __FUNCTION__, location);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
r = strtok_r(NULL, "\r\n", &s);
|
r = strtok_r(NULL, "\r\n", &s);
|
||||||
}
|
}
|
||||||
if (handleM && !isempty(location)) {
|
if (handleM && valid && !isempty(location)) {
|
||||||
long rc = 0;
|
long rc = 0;
|
||||||
CURLcode res = CURLE_OK;
|
CURLcode res = CURLE_OK;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-04-20 04:20+0200\n"
|
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
|
||||||
"PO-Revision-Date: 2014-04-20 04:20+0200\n"
|
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
|
||||||
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
||||||
"Language-Team: Catalan <vdr@linuxtv.org>\n"
|
"Language-Team: Catalan <vdr@linuxtv.org>\n"
|
||||||
"Language: ca\n"
|
"Language: ca\n"
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-04-20 04:20+0200\n"
|
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
|
||||||
"PO-Revision-Date: 2014-04-20 04:20+0200\n"
|
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
|
||||||
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
|
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
|
||||||
"Language-Team: German <vdr@linuxtv.org>\n"
|
"Language-Team: German <vdr@linuxtv.org>\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-04-20 04:20+0200\n"
|
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
|
||||||
"PO-Revision-Date: 2014-04-20 04:20+0200\n"
|
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
|
||||||
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
"Last-Translator: Gabriel Bonich <gbonich@gmail.com>\n"
|
||||||
"Language-Team: Spanish <vdr@linuxtv.org>\n"
|
"Language-Team: Spanish <vdr@linuxtv.org>\n"
|
||||||
"Language: es\n"
|
"Language: es\n"
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2014-04-20 04:20+0200\n"
|
"POT-Creation-Date: 2014-04-27 04:27+0200\n"
|
||||||
"PO-Revision-Date: 2014-04-20 04:20+0200\n"
|
"PO-Revision-Date: 2014-04-27 04:27+0200\n"
|
||||||
"Last-Translator: Rolf Ahrenberg\n"
|
"Last-Translator: Rolf Ahrenberg\n"
|
||||||
"Language-Team: Finnish <vdr@linuxtv.org>\n"
|
"Language-Team: Finnish <vdr@linuxtv.org>\n"
|
||||||
"Language: fi\n"
|
"Language: fi\n"
|
||||||
|
2
satip.c
2
satip.c
@ -25,7 +25,7 @@
|
|||||||
#define GITVERSION ""
|
#define GITVERSION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char VERSION[] = "0.3.0" GITVERSION;
|
const char VERSION[] = "0.3.1" GITVERSION;
|
||||||
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
||||||
|
|
||||||
class cPluginSatip : public cPlugin {
|
class cPluginSatip : public cPlugin {
|
||||||
|
Loading…
Reference in New Issue
Block a user