From fe828d0bb2da9a196f12bf40c0d9609f41ee2848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 12 Dec 2019 18:41:26 +0100 Subject: [PATCH] fpi-ssm: Clear delayed actions for parent and child on subssm start While timeout was already cleared for parent, we didn't properly delete the cancellable. Although we'd warn anyways when starting the SSM, is still better to clear any delayed action also for the sub-SSM --- libfprint/fpi-ssm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libfprint/fpi-ssm.c b/libfprint/fpi-ssm.c index 6e56e448..3cc39a7f 100644 --- a/libfprint/fpi-ssm.c +++ b/libfprint/fpi-ssm.c @@ -338,7 +338,10 @@ fpi_ssm_start_subsm (FpiSsm *parent, FpiSsm *child) { BUG_ON (parent->timeout); child->parentsm = parent; - g_clear_pointer (&parent->timeout, g_source_destroy); + + fpi_ssm_clear_delayed_action (parent); + fpi_ssm_clear_delayed_action (child); + fpi_ssm_start (child, __subsm_complete); }