summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 21d99ee)
raw | patch | inline | side by side (parent: 21d99ee)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 20 Mar 2016 10:53:13 +0000 (11:53 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 20 Mar 2016 10:53:13 +0000 (11:53 +0100) |
src/write_http.c | patch | blob | history |
diff --git a/src/write_http.c b/src/write_http.c
index bbd94af1408931da2bdac41f31cafda6c33644c6..c2968290055013ada258b019461a7d454130f36a 100644 (file)
--- a/src/write_http.c
+++ b/src/write_http.c
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);