diff options
| author | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-08-12 19:38:08 +0000 |
|---|---|---|
| committer | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-08-12 19:38:08 +0000 |
| commit | c4bab36eed7b9ce0ba0b16775a9d429c71c5eed7 (patch) | |
| tree | 2f3ea720dbef0788eab0afe4c74701f9011dd557 /lib/dvb_ci/dvbci.cpp | |
| parent | 93e7d5d00cc4fa9245ffae2ba63003284f5fce0f (diff) | |
| download | enigma2-c4bab36eed7b9ce0ba0b16775a9d429c71c5eed7.tar.gz enigma2-c4bab36eed7b9ce0ba0b16775a9d429c71c5eed7.zip | |
change session handling
Diffstat (limited to 'lib/dvb_ci/dvbci.cpp')
| -rw-r--r-- | lib/dvb_ci/dvbci.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index d76cd341..67b2eafa 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -44,20 +44,22 @@ void eDVBCISlot::data(int) if(r < 0) eWarning("ERROR reading from CI - %m\n"); - if(!se) { + if(state != stateInserted) { + state = stateInserted; eDebug("ci inserted"); - se = new eDVBCISession(this); - + /* enable HUP to detect removal or errors */ notifier_event->start(); } if(r > 0) - se->receiveData(data, r); + eDVBCISession::receiveData(this, data, r); } void eDVBCISlot::event(int) { + state = stateRemoved; + eDebug("CI removed"); /* kill the TransportConnection */ @@ -66,7 +68,7 @@ void eDVBCISlot::event(int) notifier_event->stop(); } -eDVBCISlot::eDVBCISlot(eMainloop *context, int nr): se(0) +eDVBCISlot::eDVBCISlot(eMainloop *context, int nr) { char filename[128]; |
