metadata: fix wait handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 25 Aug 2011 16:36:08 +0000 (12:36 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 25 Aug 2011 16:36:08 +0000 (12:36 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/ust/wait.h
libust/ltt-events.c

index 21ced509915932086570d3329073b6d7d764c0fc..6cc0e3732cec710133000d9d9dfd15b6556d1938 100644 (file)
@@ -30,7 +30,7 @@
                int __timeout = _timeout;                       \
                                                                \
                for (;;) {                                      \
-                       if (!(_cond))                           \
+                       if (_cond)                              \
                                break;                          \
                        if (__timeout <= 0) {                   \
                                __ret = -ETIMEDOUT;             \
index c99b6689200b3c8775569d8bafe05a1d1d088072..94d57c3372b5c7b7a58a43899c0c658272c0c35f 100644 (file)
@@ -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"));
This page took 0.025475 seconds and 4 git commands to generate.