Skip to content

Commit

Permalink
Remove debugging and Comment out curl return code log
Browse files Browse the repository at this point in the history
  • Loading branch information
rvishureddy committed Oct 18, 2019
1 parent c23ae6b commit 6571d42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/http/libcurl_http_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ namespace azure { namespace storage_lite {
for (int i = 0; i < m_size; i++) {
CURL *h = curl_easy_init();
curl_easy_setopt(h, CURLOPT_CAINFO, ca_path.c_str());
curl_easy_setopt(h, CURLOPT_VERBOSE, 1L);
//curl_easy_setopt(h, CURLOPT_VERBOSE, 1L);
m_handles.push(h);
}
}
Expand Down
16 changes: 7 additions & 9 deletions src/http/libcurl_http_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "http/libcurl_http_client.h"

#include "constants.h"
#include "logging.h"

namespace azure { namespace storage_lite {

Expand Down Expand Up @@ -61,16 +62,13 @@ namespace azure { namespace storage_lite {
check_code(curl_easy_setopt(m_curl, CURLOPT_HTTPHEADER, m_slist));

const auto result = curl_easy_perform(m_curl);
long code = 0;
curl_easy_getinfo(m_curl, CURLINFO_RESPONSE_CODE, &code);
if (code != 200) {
printf("error: server responded with code %ld\n", code);
}
/*
* Need further testing to add this.
if (result != 0) {
logger::log(log_level::error,"curl_easy_perform returned %d: %s\n", result, curl_easy_strerror(result));
}
*/
check_code(result); // has nothing to do with checks, just resets errno for succeeded ops.
if (result != 0) {
printf("curl_easy_perform returned %d: %s\n", result, curl_easy_strerror(result));
}

return result;
}

Expand Down

0 comments on commit 6571d42

Please sign in to comment.