From 26385914972b4f25282c91efd9740a4b118d1852 Mon Sep 17 00:00:00 2001
From: Peter Meerwald
Date: Tue, 28 Oct 2014 13:17:00 +0100
Subject: [PATCH] rtpoll: Fix condition for DEBUG_TIMING output
Signed-off-by: Peter Meerwald
---
src/pulsecore/rtpoll.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c
index 09e5e8a34..c657cb6f9 100644
--- a/src/pulsecore/rtpoll.c
+++ b/src/pulsecore/rtpoll.c
@@ -298,10 +298,12 @@ int pa_rtpoll_run(pa_rtpoll *p, bool wait_op) {
pa_usec_t now = pa_rtclock_now();
p->awake = now - p->timestamp;
p->timestamp = now;
- if (!wait_op || p->quit || p->timer_enabled)
+ if (wait_op && !p->quit && p->timer_enabled)
pa_log("poll timeout: %d ms ",(int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)));
- else
+ else if (q->quit)
pa_log("poll timeout is ZERO");
+ else
+ pa_log("poll timeout is FOREVER");
}
#endif