summaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-12 10:29:52 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-12 10:29:52 +0100
commitd1a0a2e0322e6c5b05ba7817c1c0405dc20e5414 (patch)
tree2e42a1b869eae7281d040ce9d56baf2e2998e19b /cli.c
parent9a51195b1ce73005e87c00448c908286fb5c07d7 (diff)
downloadpcitool-d1a0a2e0322e6c5b05ba7817c1c0405dc20e5414.tar.gz
pcitool-d1a0a2e0322e6c5b05ba7817c1c0405dc20e5414.tar.bz2
pcitool-d1a0a2e0322e6c5b05ba7817c1c0405dc20e5414.tar.xz
pcitool-d1a0a2e0322e6c5b05ba7817c1c0405dc20e5414.zip
Increase event timeout for large trigger times
Diffstat (limited to 'cli.c')
-rw-r--r--cli.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli.c b/cli.c
index 61c5ff3..e3024c2 100644
--- a/cli.c
+++ b/cli.c
@@ -1339,6 +1339,12 @@ int TriggerAndGrab(pcilib_t *handle, GRAB_MODE grab_mode, const char *evname, co
ctx.max_triggers = num;
ctx.trigger_count = 0;
ctx.trigger_time = trigger_time;
+
+
+ if ((timeout)&&(trigger_time * 2 > timeout)) {
+ timeout = 2 * trigger_time;
+ ctx.timeout = timeout;
+ }
// We don't really care if RT priority is imposible
pthread_attr_init(&attr);