Georgi Chorbadzhiyski
e886424c58
camd: Do not stop ECM/EMM processing thread when the incomming message is NULL.
If the message is NULL just continue. Breaking out of the loop is
wrong because it stops the ecm/processing thread and leaves tsdecrypt
in a non working state.
12 years ago
Georgi Chorbadzhiyski
affd0d8dab
Increase code word error notification time.
12 years ago
Georgi Chorbadzhiyski
24d058b0c3
Add ECM/EMM queues depth limit to avoid allocating too much memory.
13 years ago
Georgi Chorbadzhiyski
d63e496fd0
camd: Fix threaded check.
13 years ago
Georgi Chorbadzhiyski
496491b547
camd: Fix reconnect after X EMM_ERRORS.
13 years ago
Georgi Chorbadzhiyski
ce5db9e050
Simplify get_cw() protocol call.
Handle errors in generic camd code instead of protocol code.
13 years ago
Georgi Chorbadzhiyski
111846981a
Make camd->do_ecm() and camd->do_emm() ops to take struct camd_msg.
13 years ago
Georgi Chorbadzhiyski
b5bd7a9ab0
Add service_id parameter to do_emm() camd callback.
This makes do_emm() and do_ecm() take the same parameters. The next
step is to make them take struct camd_msg as single parameter.
13 years ago
Georgi Chorbadzhiyski
6404757eac
Move msg_id processing to be internal to cs378x protocol.
13 years ago
Georgi Chorbadzhiyski
a71d02e33f
Rename struct camd35 to struct camd.
13 years ago
Georgi Chorbadzhiyski
d8bad87e7d
Split cs378x protocol from generic camd code.
13 years ago
Georgi Chorbadzhiyski
f6f606830d
Use EXIT_SUCCESS and EXIT_FAILURE return codes.
13 years ago
Georgi Chorbadzhiyski
a9ee2ed0d0
Remove --camd-pkt-delay (-y) option.
This workaround is no longer needed because camd socket is now set
TCP_NODELAY and this fixes OSCAM communication.
13 years ago
Georgi Chorbadzhiyski
669132911b
Fix dumb bug.
13 years ago
Georgi Chorbadzhiyski
6eff4ccdb3
Set TCP_NODELAY to camd socket.
This way it works better when many packets are sended. Without
NODELAY, OSCAM sometimes gets packets boundaries wrong especially
when there are lots of packets (test with emm stream of 16000+
packets per minute).
13 years ago
Georgi Chorbadzhiyski
999206dd93
Sleep 10 ms when camd returned wrong code word answer.
13 years ago
Georgi Chorbadzhiyski
f603a99efb
Increase emm recv errors limit to 100.
13 years ago
Georgi Chorbadzhiyski
8830dee404
Mark code word error messages as such.
13 years ago
Georgi Chorbadzhiyski
50762790b8
Raise errors flags for ecm/emm processing only after couple of bad events.
This prevents unnececary warnings. Sometimes OSCAM responds with error
and on the next query everything is OK. So before raising errors flags
try a couple of times.
13 years ago
Georgi Chorbadzhiyski
f5ee6ade90
Mark ecm/emm sending errors as such.
13 years ago
Georgi Chorbadzhiyski
03a3b7538d
Set thread names under Linux.
13 years ago
Georgi Chorbadzhiyski
2a484e783b
notify: Add no_code_word/code_word_ok events.
13 years ago
Georgi Chorbadzhiyski
cc756b5ca5
Process ECMs before EMMs.
Use different queues for ECMs and EMMs. This allows to process
ECMs before EMMs, preventing the case where too much incoming
EMMs slow down ECM processing and interfere with getting the code
words on time.
13 years ago
Georgi Chorbadzhiyski
a8b4516e2e
camd: Make "Unexpected response" message better.
13 years ago
Georgi Chorbadzhiyski
5d32fcf0a6
Set new code code part only if it is valid.
This fixes Sky Italia HD channels. When they send new
code word the one that is about to expire is set to 0
and this causes short decryption failures. Now if code
word is all zeroes it is not set.
13 years ago
Georgi Chorbadzhiyski
0cc09adbc0
Fix CW message.
13 years ago
Georgi Chorbadzhiyski
f2f20efa60
Warn if CW have not been received.
Add --cw-warn-time to set how much time to wait before
starting to complain about code words.
13 years ago
Georgi Chorbadzhiyski
f2d5a4600f
Add ECM reports and --ecm-report-time parameter.
13 years ago
Georgi Chorbadzhiyski
6915d654dd
Move EMM reports processing into main thread.
This move is in preparation for adding ecm reports.
13 years ago
Georgi Chorbadzhiyski
2a6af1e637
Add --ecm-no-log option to disable ECM and code words logging.
13 years ago
Georgi Chorbadzhiyski
c8d7c5219d
Move libtsfuncs to libtsfuncs submodule and change libfuncs submodule url.
The libraries are now free software and are hosted on github.com
13 years ago
Georgi Chorbadzhiyski
ae59f25f12
tsdecrypt is licensed under GPL v2 now.
13 years ago
Georgi Chorbadzhiyski
34094ecd69
When connecting to camd fails wait a second.
This is not strictly correct but helps to not spam the logs
with multiple connects per second if camd server is down.
13 years ago
Georgi Chorbadzhiyski
21db3522e6
Report how much miliseconds have passed since the last valid CW was received.
13 years ago
Georgi Chorbadzhiyski
9c3cdaede1
Report how much miliseconds tsdecrypt have waited for CW.
13 years ago
Georgi Chorbadzhiyski
ce89d4fb00
Add EMM report interval option (-f) defaulting to 60 sec.
13 years ago
Georgi Chorbadzhiyski
2309ce8db3
Replace hardcoded usleep with packet_delay option (-y default unset)
13 years ago
Georgi Chorbadzhiyski
a35cfca500
Report each 60 seconds how many EMMs has been send
13 years ago
Georgi Chorbadzhiyski
04e749a777
If valid CW has not been received for 10 seconds, set invalid_cw flag
13 years ago
Georgi Chorbadzhiyski
c94b13b0a5
Init bit sliced dvbpsi key
13 years ago
Georgi Chorbadzhiyski
d8be732681
Correctly handle communications errors and reconnects
13 years ago
Georgi Chorbadzhiyski
20daa7bcef
Pass struct ts instead of struct camd35 to functions
13 years ago
Georgi Chorbadzhiyski
4a0b6d0993
Prevent fd leak on connect error
13 years ago
Georgi Chorbadzhiyski
e3fef2755c
Unify connect messages
13 years ago
Georgi Chorbadzhiyski
3419aa7d24
Change CAMD connecting messages
13 years ago
Georgi Chorbadzhiyski
4f99f75470
Move camd communication into thread
13 years ago
Georgi Chorbadzhiyski
2ea85c7a25
Add support for skipping EMM requests
13 years ago
Georgi Chorbadzhiyski
72aab3fb1e
Add workaround for OSCAM behaviour
13 years ago
Georgi Chorbadzhiyski
4a9f2e9dd7
Add workaround for OSCAM behaviour
13 years ago
Georgi Chorbadzhiyski
8685f778e5
Add buffer space in struct camd35 and use it
13 years ago