Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Stephan Raue <stephan@openelec.tv>
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-84817e6-9997.01-PVR-PR390.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 994a4cb70a9437105ef9c176d5d79939382d22e8 Mon Sep 17 00:00:00 2001 | ||
From: Gregor Fuis <gregor.fuis@gmail.com> | ||
Date: Mon, 2 Jan 2012 17:13:54 +0100 | ||
Subject: [PATCH] tvheadend pvr client: retry connecting within timout | ||
|
||
--- | ||
xbmc/pvrclients/tvheadend/HTSPConnection.cpp | 10 +++++++++- | ||
1 files changed, 9 insertions(+), 1 deletions(-) | ||
|
||
diff --git a/xbmc/pvrclients/tvheadend/HTSPConnection.cpp b/xbmc/pvrclients/tvheadend/HTSPConnection.cpp | ||
index 5f5865d..4adb45b 100644 | ||
--- a/xbmc/pvrclients/tvheadend/HTSPConnection.cpp | ||
+++ b/xbmc/pvrclients/tvheadend/HTSPConnection.cpp | ||
@@ -57,12 +57,20 @@ bool CHTSPConnection::Connect() | ||
if (m_bIsConnected) | ||
return true; | ||
|
||
+ cTimeMs RetryTimeout; | ||
char errbuf[1024]; | ||
int errlen = sizeof(errbuf); | ||
|
||
XBMC->Log(LOG_DEBUG, "%s - connecting to '%s', port '%d'", __FUNCTION__, m_strHostname.c_str(), m_iPortnumber); | ||
|
||
- m_fd = tcp_connect(m_strHostname.c_str(), m_iPortnumber, errbuf, errlen, m_iConnectTimeout); | ||
+ m_fd = INVALID_SOCKET; | ||
+ while (m_fd == INVALID_SOCKET && RetryTimeout.Elapsed() < (uint)m_iConnectTimeout * 1000) | ||
+ { | ||
+ m_fd = tcp_connect(m_strHostname.c_str(), m_iPortnumber, errbuf, errlen, | ||
+ m_iConnectTimeout * 1000 - RetryTimeout.Elapsed()); | ||
+ cCondWait::SleepMs(100); | ||
+ } | ||
+ | ||
if(m_fd == INVALID_SOCKET) | ||
{ | ||
XBMC->Log(LOG_ERROR, "%s - failed to connect to the backend (%s)", __FUNCTION__, errbuf); | ||
-- | ||
1.7.5.4 | ||
|
30 changes: 30 additions & 0 deletions
30
packages/mediacenter/xbmc-pvr/patches/xbmc-pvr-84817e6-9997.02-PVR-PR366.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 949162c47809bb7e9ae2e2b24aad7776a737ecc4 Mon Sep 17 00:00:00 2001 | ||
From: Lars Op den Kamp <lars@opdenkamp.eu> | ||
Date: Tue, 3 Jan 2012 02:09:37 +0100 | ||
Subject: [PATCH] pvr: remove deleted channels from the internal group too. | ||
closes #366 | ||
|
||
--- | ||
xbmc/pvr/channels/PVRChannelGroup.cpp | 5 +---- | ||
1 files changed, 1 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/xbmc/pvr/channels/PVRChannelGroup.cpp b/xbmc/pvr/channels/PVRChannelGroup.cpp | ||
index 9748fb0..0f74527 100644 | ||
--- a/xbmc/pvr/channels/PVRChannelGroup.cpp | ||
+++ b/xbmc/pvr/channels/PVRChannelGroup.cpp | ||
@@ -608,11 +608,8 @@ bool CPVRChannelGroup::RemoveDeletedChannels(const CPVRChannelGroup &channels) | ||
/* since it was not found in the internal group, it was deleted from the backend */ | ||
channel->Delete(); | ||
} | ||
- else | ||
- { | ||
- erase(begin() + iChannelPtr); | ||
- } | ||
|
||
+ erase(begin() + iChannelPtr); | ||
m_bChanged = true; | ||
bReturn = true; | ||
} | ||
-- | ||
1.7.5.4 | ||
|