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:
Jon Siwek 2012-07-30 11:07:43 -05:00
parent 4ba038070f
commit 00d41bb549

View file

@ -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;