Fixes to elasticsearch plugin to make libcurl handle http responses correctly.

This commit is contained in:
Seth Hall 2012-07-25 17:01:47 -04:00
parent a33e9a6941
commit f2a0afad3c
2 changed files with 3 additions and 3 deletions

View file

@ -359,10 +359,10 @@ CURL* ElasticSearch::HTTPSetup()
return handle;
}
bool ElasticSearch::HTTPReceive(void* ptr, int size, int nmemb, void* userdata)
size_t ElasticSearch::HTTPReceive(void* ptr, int size, int nmemb, void* userdata)
{
//TODO: Do some verification on the result?
return true;
return size;
}
bool ElasticSearch::HTTPSend(CURL *handle)

View file

@ -45,7 +45,7 @@ private:
bool UpdateIndex(double now, double rinterval, double rbase);
CURL* HTTPSetup();
bool HTTPReceive(void* ptr, int size, int nmemb, void* userdata);
size_t HTTPReceive(void* ptr, int size, int nmemb, void* userdata);
bool HTTPSend(CURL *handle);
// Buffers, etc.