From b472cfc0aede5a39d27893346bc6dff8856f6891 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 25 Aug 2011 12:36:08 -0400 Subject: [PATCH 1/1] metadata: fix wait handling Signed-off-by: Mathieu Desnoyers --- include/ust/wait.h | 2 +- libust/ltt-events.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ust/wait.h b/include/ust/wait.h index 21ced509..6cc0e373 100644 --- a/include/ust/wait.h +++ b/include/ust/wait.h @@ -30,7 +30,7 @@ int __timeout = _timeout; \ \ for (;;) { \ - if (!(_cond)) \ + if (_cond) \ break; \ if (__timeout <= 0) { \ __ret = -ETIMEDOUT; \ diff --git a/libust/ltt-events.c b/libust/ltt-events.c index c99b6689..94d57c33 100644 --- a/libust/ltt-events.c +++ b/libust/ltt-events.c @@ -402,7 +402,7 @@ int lttng_metadata_printf(struct ltt_session *session, ret != -ENOBUFS || !ret; }), LTTNG_METADATA_TIMEOUT_MSEC); - if (!waitret || waitret == -EINTR || ret) { + if (waitret == -ETIMEDOUT || waitret == -EINTR || ret) { DBG("LTTng: Failure to write metadata to buffers (%s)\n", waitret == -EINTR ? "interrupted" : (ret == -ENOBUFS ? "timeout" : "I/O error")); -- 2.34.1