Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/detection/publicip/publicip.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ void ffPreparePublicIp(FFPublicIPOptions* options) {
FFNetworkingState* state = &states[options->ipv6];
const char** status = &statuses[options->ipv6];
if (*status != FF_UNINITIALIZED) {
fputs("Error: PublicIp module can only be used once due to internal limitations\n", stderr);
exit(1);
*status = "PublicIp module can only be used once due to internal limitations";
return;
}

state->timeout = options->timeout;
Expand All @@ -25,8 +25,8 @@ void ffPreparePublicIp(FFPublicIPOptions* options) {
uint32_t hostStartIndex = ffStrbufFirstIndexS(&host, "://");
if (hostStartIndex < host.length) {
if (hostStartIndex != 4 || !ffStrbufStartsWithIgnCaseS(&host, "http")) {
fputs("Error: only http: protocol is supported. Use `Command` module with `curl` if needed\n", stderr);
exit(1);
*status = "Only http: protocol is supported. Use `Command` module with `curl` if needed";
return;
}
ffStrbufSubstrAfter(&host, hostStartIndex + (uint32_t) (strlen("://") - 1));
}
Expand Down
1 change: 1 addition & 0 deletions src/modules/separator/separator.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ void ffInitSeparatorOptions(FFSeparatorOptions* options) {

void ffDestroySeparatorOptions(FFSeparatorOptions* options) {
ffStrbufDestroy(&options->string);
ffStrbufDestroy(&options->outputColor);
}

FFModuleBaseInfo ffSeparatorModuleInfo = {
Expand Down
Loading