mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
candump: fix accidentally disabled traffic timeout feature
With the option '-T <msecs>' candump terminates after getting no CAN traffic
for a specific time. With the introduction of epoll_wait() this feature
has been accidentally disabled.
This patch adds an extra check to detect the timeout again.
Fixes: 639498bc80 ("candump: use epoll_wait() instead of select()")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
@@ -708,6 +708,12 @@ int main(int argc, char **argv)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* handle timeout */
|
||||
if (!num_events && timeout_ms >= 0) {
|
||||
running = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_events; i++) { /* check waiting CAN RAW sockets */
|
||||
struct if_info* obj = events_pending[i].data.ptr;
|
||||
int idx;
|
||||
|
||||
Reference in New Issue
Block a user