From 5476e014075681dd5b309f2734ed60c8dd648733 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Tue, 28 Jul 2026 10:38:53 +0800 Subject: [PATCH] Revert "PublicIP: replaces exit(1) with proper error status" This reverts commit 18eef29d0a9aa0b41f6b406d9896daf886c89670. --- src/detection/publicip/publicip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/detection/publicip/publicip.c b/src/detection/publicip/publicip.c index 4ae7116e5..c0e8afb47 100644 --- a/src/detection/publicip/publicip.c +++ b/src/detection/publicip/publicip.c @@ -9,8 +9,8 @@ void ffPreparePublicIp(FFPublicIPOptions* options) { FFNetworkingState* state = &states[options->ipv6]; const char** status = &statuses[options->ipv6]; if (*status != FF_UNINITIALIZED) { - *status = "PublicIp module can only be used once due to internal limitations"; - return; + fputs("Error: PublicIp module can only be used once due to internal limitations\n", stderr); + exit(1); } state->timeout = options->timeout; @@ -25,8 +25,8 @@ void ffPreparePublicIp(FFPublicIPOptions* options) { uint32_t hostStartIndex = ffStrbufFirstIndexS(&host, "://"); if (hostStartIndex < host.length) { if (hostStartIndex != 4 || !ffStrbufStartsWithIgnCaseS(&host, "http")) { - *status = "Only http: protocol is supported. Use `Command` module with `curl` if needed"; - return; + fputs("Error: only http: protocol is supported. Use `Command` module with `curl` if needed\n", stderr); + exit(1); } ffStrbufSubstrAfter(&host, hostStartIndex + (uint32_t) (strlen("://") - 1)); }