aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/dvb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dvb/dvb.cpp')
-rw-r--r--lib/dvb/dvb.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index 0201b337..32c7ea31 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -491,7 +491,18 @@ RESULT eDVBChannel::setChannel(const eDVBChannelID &channelid)
m_channel_id = channelid;
m_mgr->addChannel(channelid, this);
m_state = state_tuning;
- return m_frontend->get().tune(*feparm);
+ /* if tuning fails, shutdown the channel immediately. */
+ int res;
+ res = m_frontend->get().tune(*feparm);
+
+ if (res)
+ {
+ m_state = state_release;
+ m_stateChanged(this);
+ return res;
+ }
+
+ return 0;
}
RESULT eDVBChannel::connectStateChange(const Slot1<void,iDVBChannel*> &stateChange, ePtr<eConnection> &connection)