mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Added a validity check for the session member.
This commit is contained in:
parent
53b643139f
commit
5e2770a0e5
4
tuner.c
4
tuner.c
@ -26,7 +26,7 @@ cSatipTuner::cSatipTuner(cSatipDeviceIf &deviceP, unsigned int packetLenP)
|
|||||||
headerListM(NULL),
|
headerListM(NULL),
|
||||||
keepAliveM(),
|
keepAliveM(),
|
||||||
pidUpdateCacheM(),
|
pidUpdateCacheM(),
|
||||||
sessionM(),
|
sessionM(""),
|
||||||
timeoutM(eMinKeepAliveIntervalMs),
|
timeoutM(eMinKeepAliveIntervalMs),
|
||||||
openedM(false),
|
openedM(false),
|
||||||
tunedM(false),
|
tunedM(false),
|
||||||
@ -240,7 +240,7 @@ bool cSatipTuner::Connect(void)
|
|||||||
// Session id is now known - disable header parsing
|
// Session id is now known - disable header parsing
|
||||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_HEADERFUNCTION, NULL);
|
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_HEADERFUNCTION, NULL);
|
||||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_WRITEHEADER, NULL);
|
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_WRITEHEADER, NULL);
|
||||||
if (nextServerM && nextServerM->Quirk(cSatipServer::eSatipQuirkSessionId) && startswith(*sessionM, "0")) {
|
if (nextServerM && nextServerM->Quirk(cSatipServer::eSatipQuirkSessionId) && !isempty(*sessionM) && startswith(*sessionM, "0")) {
|
||||||
debug("cSatipTuner::%s(): session id quirk [device %d]", __FUNCTION__, deviceM->GetId());
|
debug("cSatipTuner::%s(): session id quirk [device %d]", __FUNCTION__, deviceM->GetId());
|
||||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_SESSION_ID, *sessionM + 1);
|
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_SESSION_ID, *sessionM + 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user