summaryrefslogtreecommitdiffstats
path: root/lib/Utils/abrt_curl.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-03-25 14:22:15 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-03-25 14:22:15 +0100
commitbb36076a03ce7bb40113d618db6d0343b8477c3f (patch)
tree917dbbeadcbfa235434d51891feafc13dfe97e2e /lib/Utils/abrt_curl.cpp
parent7b721840773a6faf2fa93562aeae1cc4c7d05804 (diff)
downloadabrt-bb36076a03ce7bb40113d618db6d0343b8477c3f.tar.gz
abrt-bb36076a03ce7bb40113d618db6d0343b8477c3f.tar.xz
abrt-bb36076a03ce7bb40113d618db6d0343b8477c3f.zip
rhfastcheck: a new reporter plugin based on Gavin's work
Plugin quickly checks RH support DB for known solutions. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Utils/abrt_curl.cpp')
-rw-r--r--lib/Utils/abrt_curl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Utils/abrt_curl.cpp b/lib/Utils/abrt_curl.cpp
index f327bd8c..6dc8582f 100644
--- a/lib/Utils/abrt_curl.cpp
+++ b/lib/Utils/abrt_curl.cpp
@@ -69,7 +69,7 @@ save_headers(void *buffer_pv, size_t count, size_t nmemb, void *ptr)
char *h = xstrndup((char*)buffer_pv, size);
strchrnul(h, '\r')[0] = '\0';
strchrnul(h, '\n')[0] = '\0';
- VERB3 log("save_headers: state:%p header %d: '%s'", state, cnt, h);
+ VERB3 log("save_headers: header %d: '%s'", cnt, h);
state->headers[cnt] = h;
state->header_cnt = ++cnt;
state->headers[cnt] = NULL;
@@ -81,9 +81,9 @@ int
curl_post(curl_post_state_t* state, const char* url, const char* data)
{
CURLcode curl_err;
+ long response_code;
struct curl_slist *httpheader_list = NULL;
FILE* body_stream = NULL;
- long response_code;
curl_post_state_t localstate;
VERB3 log("curl_post('%s','%s')", url, data);
@@ -95,7 +95,6 @@ curl_post(curl_post_state_t* state, const char* url, const char* data)
}
state->http_resp_code = response_code = -1;
- state->curl_error_msg = NULL;
CURL *handle = xcurl_easy_init();
@@ -145,6 +144,8 @@ curl_post(curl_post_state_t* state, const char* url, const char* data)
die_if_curl_error(curl_err);
state->http_resp_code = response_code;
+ VERB3 log("after curl_easy_perform: http code %ld body:'%s'", response_code, state->body);
+
ret:
curl_easy_cleanup(handle);
curl_slist_free_all(httpheader_list);