From e2c543e53d4e7223dacd7889d6fb0597dd8056cc Mon Sep 17 00:00:00 2001 From: Maximilian Fridrich Date: Wed, 8 Jan 2025 10:44:44 +0100 Subject: [PATCH] qualify: fix call_get_qualle --- modules/qualify/qualify.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/qualify/qualify.c b/modules/qualify/qualify.c index 3b44420..277a620 100644 --- a/modules/qualify/qualify.c +++ b/modules/qualify/qualify.c @@ -212,21 +212,20 @@ static void call_start_qualify(struct call *call, static bool qualle_get_applyh(struct le *le, void *arg) { - (void)le; - (void)arg; + const struct call *call = arg; + const struct qualle *qualle = le->data; - return true; + return qualle->call == call; } -static struct qualle *call_get_qualle(const struct call *call) +static struct qualle *call_get_qualle(struct call *call) { if (!call) return NULL; - struct le *le = hash_lookup(q.qual_map, - hash_fast_str(call_id(call)), - qualle_get_applyh, NULL); + struct le *le = hash_lookup(q.qual_map, hash_fast_str(call_id(call)), + qualle_get_applyh, call); return le ? le->data : NULL; }