Improve doublecheck
= Revision 11732
= Issue Description Doublecheck feature in OSCam is almost unusable. There are many issues with it:
- lot of spam to log (I would prefer having global logs only when CW is invalid)
- can not recover itself if first CW was invalid (until another reader confirms invalid CW)
- corrupted CW goes to cache and other clients would get corrupted CW if asked for decode the same ECM (cache1)
This patch improves doublecheck so it starts to be usable:
- we store 2 CWs instead of 1, this allows to compare CW from 3rd reader
- in case of 1 bad and 2 valid readers, doublecheck is able to detect and drop invalid CW correctly
- unfortunately, marking bad reader in stats has not been implemented yet
- in case of 2 bad readers we are not able to have any success (as doublecheck can not do magic)
- in case of 1 bad and 2 valid readers, doublecheck is able to detect and drop invalid CW correctly
- non-debug log is pushed when doublecheck detects bad CW
- we pause adding first CW to cache until we verify it
- we do not do doublecheck at all, if cw_cycle_check succeed (it always has priority as it runs before doublecheck)
- consider doublecheck as additional check for CWs that can not be checked by cw_cycle_check yet (like CWC LEARN)
= When the issue occurs Always when doublecheck was enabled
= How the issue is reproducable Connect readers producing fake CWs
= Possible effects Increased time reports for answers from cache1
Edited by lpm11