int format;
CURL *curl;
- struct curl_slist *headers;
+ struct curl_slist *headers;
char curl_errbuf[CURL_ERROR_SIZE];
char send_buffer[4096];
curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt (cb->curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION);
- cb->headers = NULL;
+ cb->headers = NULL;
cb->headers = curl_slist_append (cb->headers, "Accept: */*");
if (cb->format == WH_FORMAT_JSON)
cb->headers = curl_slist_append (cb->headers, "Content-Type: application/json");
curl_easy_cleanup (cb->curl);
- if (cb->headers != NULL)
- {
- curl_slist_free_all (cb->headers);
- cb->headers = NULL;
- }
+ if (cb->headers != NULL)
+ {
+ curl_slist_free_all (cb->headers);
+ cb->headers = NULL;
+ }
sfree (cb->location);
sfree (cb->user);
cb->cacert = NULL;
cb->format = WH_FORMAT_COMMAND;
cb->curl = NULL;
- cb->headers = NULL;
+ cb->headers = NULL;
pthread_mutex_init (&cb->send_lock, /* attr = */ NULL);