mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
Add Timeout for emergency start of pollthread and some more debug output
Origin commit data
------------------
Branch: master
Commit: 62c00203f9
Author: FlatTV <FlatTV@gmx.de>
Date: 2021-06-03 (Thu, 03 Jun 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1532,12 +1532,21 @@ void cCA::slot_pollthread(void *c)
|
|||||||
if (!zapitReady)
|
if (!zapitReady)
|
||||||
{
|
{
|
||||||
printf("[CA] Slot%d: Waiting for zapit\n", slot->slot);
|
printf("[CA] Slot%d: Waiting for zapit\n", slot->slot);
|
||||||
|
const int waiting = 3 * 1000000; // wait for 3 seconds
|
||||||
|
const int maxwait = waiting * 6;
|
||||||
|
int timeout = 0;
|
||||||
|
|
||||||
while (!zapitReady)
|
while (!zapitReady)
|
||||||
{
|
{
|
||||||
usleep( 3 * 1000000); //wait for 3 seconds
|
usleep(waiting);
|
||||||
|
if (timeout >= maxwait)
|
||||||
|
zapitReady = true;
|
||||||
|
else
|
||||||
|
timeout += waiting;
|
||||||
}
|
}
|
||||||
printf("[CA] Slot%d: zapit is ready\n", slot->slot);
|
printf("[CA] Slot%d: %s\n", slot->slot, timeout >= maxwait ? "waiting timeout!" : "zapit is ready");
|
||||||
}
|
}
|
||||||
|
printf("[CA] Slot%d: start pollthread\n", slot->slot);
|
||||||
#endif
|
#endif
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user