From bd440dcdcb88feb96bb2b45fd561b93b4d8df068 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 14 Jan 2025 11:01:53 -0400 Subject: [PATCH] MT#55283 use enum ng_opmode Change-Id: Ic511765a87faf53d9b8afd4a216bfcb1755f5c5e --- daemon/control_ng.c | 4 ++-- include/cookie_cache.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/daemon/control_ng.c b/daemon/control_ng.c index 65f48ef01..4fa973266 100644 --- a/daemon/control_ng.c +++ b/daemon/control_ng.c @@ -72,7 +72,7 @@ const char *ng_command_strings_short[OP_COUNT] = { typedef struct ng_ctx { str callid; - int command; + enum ng_opmode command; str cookie; bool should_trace; const endpoint_t *sin_ep; @@ -551,7 +551,7 @@ static bool should_trace_msg(enum ng_opmode command) { } } -static void homer_fill_values(ng_ctx *hctx, str *callid, int command) { +static void homer_fill_values(ng_ctx *hctx, str *callid, enum ng_opmode command) { if (hctx) { hctx->command = command; hctx->callid = *callid; diff --git a/include/cookie_cache.h b/include/cookie_cache.h index 76954d0ec..f50aa9ce5 100644 --- a/include/cookie_cache.h +++ b/include/cookie_cache.h @@ -6,6 +6,7 @@ #include "helpers.h" #include "str.h" +#include "control_ng.h" struct cookie_cache_state { GHashTable *in_use; @@ -15,7 +16,7 @@ struct cookie_cache_state { typedef struct cache_entry { str reply; str callid; - int command; + enum ng_opmode command; } cache_entry; INLINE cache_entry *cache_entry_dup(const cache_entry *s) {