Skip to content

Commit

Permalink
#38 Build ppcosnul without support for stopping if libcurl is older t…
Browse files Browse the repository at this point in the history
…han 7.32.0
  • Loading branch information
oliora committed Jun 19, 2019
1 parent 8ac2f9e commit 6a1a8aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/curl/http_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,13 @@ namespace ppconsul { namespace curl {

if (m_enableStop)
{
#if (LIBCURL_VERSION_NUM >= 0x073200)
setopt(CURLOPT_NOPROGRESS, 0l);
setopt(CURLOPT_XFERINFOFUNCTION, &progressCallback);
setopt(CURLOPT_XFERINFODATA, this);
#else
throw std::logic_error("Ppconsul is built without support for stopping the client (libcurl 7.32.0 or newer is required)");
#endif
}
else
{
Expand Down

0 comments on commit 6a1a8aa

Please sign in to comment.