mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Add missing breaks to switch cases in ElasticSearch::HTTPReceive().
Observed as reason for segfault in testing/btest/scripts/check-test-all-policy.bro unit test when compiled with optimizations.
This commit is contained in:
parent
4ba038070f
commit
00d41bb549
1 changed files with 4 additions and 0 deletions
|
@ -385,12 +385,14 @@ bool ElasticSearch::HTTPSend(CURL *handle)
|
|||
if ( ! failing )
|
||||
Error(Fmt("ElasticSearch server may not be accessible."));
|
||||
}
|
||||
break;
|
||||
|
||||
case CURLE_OPERATION_TIMEDOUT:
|
||||
{
|
||||
if ( ! failing )
|
||||
Warning(Fmt("HTTP operation with elasticsearch server timed out at %" PRIu64 " msecs.", transfer_timeout));
|
||||
}
|
||||
break;
|
||||
|
||||
case CURLE_OK:
|
||||
{
|
||||
|
@ -402,10 +404,12 @@ bool ElasticSearch::HTTPSend(CURL *handle)
|
|||
else if ( ! failing )
|
||||
Error(Fmt("Received a non-successful status code back from ElasticSearch server, check the elasticsearch server log."));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
}
|
||||
break;
|
||||
}
|
||||
// The "successful" return happens above
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue