mirror of
				https://github.com/rofafor/vdr-plugin-satip.git
				synced 2023-10-10 11:37:42 +00:00 
			
		
		
		
	Fixed keepalive heartbeat again.
This commit is contained in:
		
							
								
								
									
										3
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								HISTORY
									
									
									
									
									
								
							@@ -26,9 +26,10 @@ VDR Plugin 'satip' Revision History
 | 
			
		||||
- Fixed pid leaking while disabling section filters.
 | 
			
		||||
- Fixed keepalive heartbeat.
 | 
			
		||||
 | 
			
		||||
2014-03-30: Version 0.2.1
 | 
			
		||||
2014-04-01: Version 0.2.1
 | 
			
		||||
 | 
			
		||||
- Changed implementation to report about RTP packet
 | 
			
		||||
  errors on 5 minutes interval only.
 | 
			
		||||
- Added a check to write new sections only if there
 | 
			
		||||
  is no data in the read socket.
 | 
			
		||||
- Fixed keepalive heartbeat again.
 | 
			
		||||
 
 | 
			
		||||
@@ -7,8 +7,8 @@ msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: vdr-satip 0.2.1\n"
 | 
			
		||||
"Report-Msgid-Bugs-To: <see README>\n"
 | 
			
		||||
"POT-Creation-Date: 2014-03-30 03:30+0200\n"
 | 
			
		||||
"PO-Revision-Date: 2014-03-30 03:30+0200\n"
 | 
			
		||||
"POT-Creation-Date: 2014-04-01 04:01+0200\n"
 | 
			
		||||
"PO-Revision-Date: 2014-04-01 04:01+0200\n"
 | 
			
		||||
"Last-Translator: Frank Neumann <fnu@yavdr.org>\n"
 | 
			
		||||
"Language-Team: German <vdr@linuxtv.org>\n"
 | 
			
		||||
"Language: de\n"
 | 
			
		||||
 
 | 
			
		||||
@@ -7,8 +7,8 @@ msgid ""
 | 
			
		||||
msgstr ""
 | 
			
		||||
"Project-Id-Version: vdr-satip 0.2.1\n"
 | 
			
		||||
"Report-Msgid-Bugs-To: <see README>\n"
 | 
			
		||||
"POT-Creation-Date: 2014-03-30 03:30+0200\n"
 | 
			
		||||
"PO-Revision-Date: 2014-03-30 03:30+0200\n"
 | 
			
		||||
"POT-Creation-Date: 2014-04-01 04:01+0200\n"
 | 
			
		||||
"PO-Revision-Date: 2014-04-01 04:01+0200\n"
 | 
			
		||||
"Last-Translator: Rolf Ahrenberg\n"
 | 
			
		||||
"Language-Team: Finnish <vdr@linuxtv.org>\n"
 | 
			
		||||
"Language: fi\n"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								tuner.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								tuner.c
									
									
									
									
									
								
							@@ -27,7 +27,7 @@ cSatipTuner::cSatipTuner(cSatipDeviceIf &deviceP, unsigned int packetLenP)
 | 
			
		||||
  keepAliveM(),
 | 
			
		||||
  pidUpdateCacheM(),
 | 
			
		||||
  sessionM(),
 | 
			
		||||
  timeoutM(eDefKeepAliveIntervalMs),
 | 
			
		||||
  timeoutM(eMinKeepAliveIntervalMs),
 | 
			
		||||
  openedM(false),
 | 
			
		||||
  tunedM(false),
 | 
			
		||||
  hasLockM(false),
 | 
			
		||||
@@ -83,9 +83,9 @@ size_t cSatipTuner::HeaderCallback(void *ptrP, size_t sizeP, size_t nmembP, void
 | 
			
		||||
           int timeout = -1;
 | 
			
		||||
           char *session = NULL;
 | 
			
		||||
           if (sscanf(r, "Session:%m[^;];timeout=%11d", &session, &timeout) == 2)
 | 
			
		||||
              obj->SetSessionTimeout(skipspace(session), timeout);
 | 
			
		||||
              obj->SetSessionTimeout(skipspace(session), (timeout - 1) * 1000);
 | 
			
		||||
           else if (sscanf(r, "Session:%m[^;]", &session) == 1)
 | 
			
		||||
              obj->SetSessionTimeout(skipspace(session), -1);
 | 
			
		||||
              obj->SetSessionTimeout(skipspace(session));
 | 
			
		||||
           FREE_POINTER(session);
 | 
			
		||||
           }
 | 
			
		||||
        r = strtok_r(NULL, "\r\n", &s);
 | 
			
		||||
@@ -304,7 +304,7 @@ bool cSatipTuner::Disconnect(void)
 | 
			
		||||
  if (currentServerM)
 | 
			
		||||
     cSatipDiscover::GetInstance()->UseServer(currentServerM, false);
 | 
			
		||||
  tunedM = false;
 | 
			
		||||
  timeoutM = eDefKeepAliveIntervalMs;
 | 
			
		||||
  timeoutM = eMinKeepAliveIntervalMs;
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
@@ -383,12 +383,7 @@ void cSatipTuner::SetSessionTimeout(const char *sessionP, int timeoutP)
 | 
			
		||||
  cMutexLock MutexLock(&mutexM);
 | 
			
		||||
  debug("cSatipTuner::%s(%s, %d)", __FUNCTION__, sessionP, timeoutP);
 | 
			
		||||
  sessionM = sessionP;
 | 
			
		||||
  if (timeoutP > 30)
 | 
			
		||||
     timeoutM = timeoutP * 1000L;
 | 
			
		||||
  else if (timeoutP > 0)
 | 
			
		||||
     timeoutM = eMinKeepAliveIntervalMs;
 | 
			
		||||
  else
 | 
			
		||||
     timeoutM = eDefKeepAliveIntervalMs;
 | 
			
		||||
  timeoutM = (timeoutP > eMinKeepAliveIntervalMs) ? timeoutP : eMinKeepAliveIntervalMs;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool cSatipTuner::SetSource(cSatipServer *serverP, const char *parameterP, const int indexP)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								tuner.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								tuner.h
									
									
									
									
									
								
							@@ -29,8 +29,7 @@ private:
 | 
			
		||||
    eConnectTimeoutMs       = 1500,   // in milliseconds
 | 
			
		||||
    ePidUpdateIntervalMs    = 100,    // in milliseconds
 | 
			
		||||
    eReConnectTimeoutMs     = 5000,   // in milliseconds
 | 
			
		||||
    eMinKeepAliveIntervalMs = 300000, // in milliseconds
 | 
			
		||||
    eDefKeepAliveIntervalMs = 600000  // in milliseconds
 | 
			
		||||
    eMinKeepAliveIntervalMs = 300000  // in milliseconds
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  static size_t HeaderCallback(void *ptrP, size_t sizeP, size_t nmembP, void *dataP);
 | 
			
		||||
@@ -67,7 +66,7 @@ private:
 | 
			
		||||
  bool ValidateLatestResponse(void);
 | 
			
		||||
  void ParseReceptionParameters(const char *paramP);
 | 
			
		||||
  void SetStreamId(int streamIdP);
 | 
			
		||||
  void SetSessionTimeout(const char *sessionP, int timeoutP);
 | 
			
		||||
  void SetSessionTimeout(const char *sessionP, int timeoutP = 0);
 | 
			
		||||
  bool KeepAlive(void);
 | 
			
		||||
  bool UpdateSignalInfoCache(void);
 | 
			
		||||
  bool UpdatePids(void);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user