Opened 8 years ago
Closed 8 years ago
#4394 closed defect (fixed)
Resharing a cccam reader to cccam clients fails after idle
Reported by: | John Doe | Owned by: | |
---|---|---|---|
Priority: | critical | Component: | Reader |
Severity: | medium | Keywords: | |
Cc: | Sensitive: | no |
Description
Revision
10997 (first revision I tried)
Issue Description
The problem occurs in a configuration with a cccam reader, and one or more cccam clients. When all clients are idle, the cccam reader becomes also idle and disconnects (after idle timeout). When the reader is disconnected, it doesn't have any card data to share. Periodically every 240 seconds (when in "interval" mode) a share_updater thread runs. When it finds that the reader has no cards to share, it removes the cards from the cccam share list. When at a later time a cccam client becomes active again, the cccam reader is correctly connected again, however, the list of shared cards is only updated by the share_updater thread every 240 seconds (4 minutes!). So the cccam client gets "0 cards available" reported. So it doesn't make any requests. So the cccam reader stays idle, and disconnects after the idle timeout. As a result, resharing a cccam reader to cccam clients does not work at all in this scenario.
When the issue occurs
Always in the above scenario.
How the issue is reproducible
Configure a cccam reader which disconnects when idle, a cccam client, (re)start OSCam and verify that it works. Then make the client idle and wait for the cccam reader to disconnect. Wait 10 minutes more, or enable debug messages and wait for the share_updater thread messages that it has removed the cards from the share list. Then try to use the client: It will not work because no shared cards are available.
Patch
To fix this issue, the patch attached here adds a flag (share_updater_refresh) that is set when new card data is received by a cccam reader. This flag is checked by the share_updater thread every 0.5 seconds, and when set, it will start the normal share update cycle, but this time promptly when new cards are available. As a result, the cards from the cccam reader are reported to the cccam clients, and everything works fine.
Attachments (1)
Change History (2)
by , 8 years ago
Attachment: | oscam1.patch added |
---|
comment:1 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Added with r11259. Thank you.