From abed7978f6224599dc73fab221882102dcb35b00 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 11 Mar 2022 19:44:58 +0200 Subject: [PATCH] HS 2.0 server: Event log entry on missing configuration for the realm Make the error reason clearer in the event log for the case where the requested realm has not been configured. Signed-off-by: Jouni Malinen --- hs20/server/spp_server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hs20/server/spp_server.c b/hs20/server/spp_server.c index a50e9074f..72694be6e 100644 --- a/hs20/server/spp_server.c +++ b/hs20/server/spp_server.c @@ -1385,8 +1385,11 @@ static xml_node_t * hs20_subscription_registration(struct hs20_svc *ctx, SUBSCRIPTION_REGISTRATION, mac_addr) < 0) return NULL; val = db_get_osu_config_val(ctx, realm, "signup_url"); - if (val == NULL) + if (!val) { + hs20_eventlog(ctx, NULL, realm, session_id, + "signup_url not configured in osu_config", NULL); return NULL; + } spp_node = build_post_dev_data_response(ctx, &ns, session_id, "OK", NULL);