mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +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 )
|
if ( ! failing )
|
||||||
Error(Fmt("ElasticSearch server may not be accessible."));
|
Error(Fmt("ElasticSearch server may not be accessible."));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case CURLE_OPERATION_TIMEDOUT:
|
case CURLE_OPERATION_TIMEDOUT:
|
||||||
{
|
{
|
||||||
if ( ! failing )
|
if ( ! failing )
|
||||||
Warning(Fmt("HTTP operation with elasticsearch server timed out at %" PRIu64 " msecs.", transfer_timeout));
|
Warning(Fmt("HTTP operation with elasticsearch server timed out at %" PRIu64 " msecs.", transfer_timeout));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case CURLE_OK:
|
case CURLE_OK:
|
||||||
{
|
{
|
||||||
|
@ -402,10 +404,12 @@ bool ElasticSearch::HTTPSend(CURL *handle)
|
||||||
else if ( ! failing )
|
else if ( ! failing )
|
||||||
Error(Fmt("Received a non-successful status code back from ElasticSearch server, check the elasticsearch server log."));
|
Error(Fmt("Received a non-successful status code back from ElasticSearch server, check the elasticsearch server log."));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// The "successful" return happens above
|
// The "successful" return happens above
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue