From b3f620436c387df35cda569164a2322bbdbf36e1 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 22 Sep 2017 16:34:58 +0200 Subject: [PATCH] dde_linux: fix timer deletion and modification (lx_kit) --- repos/dde_linux/src/lx_kit/timer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/dde_linux/src/lx_kit/timer.cc b/repos/dde_linux/src/lx_kit/timer.cc index b2c76a286..dd94ab49d 100644 --- a/repos/dde_linux/src/lx_kit/timer.cc +++ b/repos/dde_linux/src/lx_kit/timer.cc @@ -241,7 +241,7 @@ class Lx_kit::Timer : public Lx::Timer if (!ctx) return 0; - int rv = ctx->timeout != Context::INVALID_TIMEOUT ? 1 : 0; + int rv = ctx->pending ? 1 : 0; _list.remove(ctx); destroy(&_timer_alloc, ctx); @@ -261,7 +261,7 @@ class Lx_kit::Timer : public Lx::Timer * If timer was already active return 1, otherwise 0. The return * value is needed by mod_timer(). */ - int rv = ctx->timeout != Context::INVALID_TIMEOUT ? 1 : 0; + int rv = ctx->pending ? 1 : 0; _schedule_timer(ctx, expires);