Skip to content
Snippets Groups Projects
Commit 5bcc39d4 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

minor clean ups

parent 69966c4f
No related branches found
No related tags found
No related merge requests found
......@@ -180,8 +180,6 @@ leave_token:
return ptr;
}
struct string *memalloc_write_result(void)
{
struct string *wr = (struct string *) calloc(1, sizeof(*wr));
......@@ -202,7 +200,6 @@ fail_calloc_struct:
return NULL;
}
void free_write_result(struct string *result) // wont work unless you send the ptr address and set to NULL
{
if (result) {
......@@ -211,29 +208,24 @@ void free_write_result(struct string *result) // wont work unless you send the p
}
}
int check_cookie_status(CURLcode status, CURL *curl) //how does this function relate to cookies?
{
long code;
if (status != 0) {
if (DEBUG)
printf(": %s\n", curl_easy_strerror(status));
lib_debug_print(": %s\n", curl_easy_strerror(status));
return 1; // multiple returns, could use goto
}
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
if (code != 200) {
if (DEBUG)
printf("error: server responded with code %ld\n", code);
lib_debug_print("error: server responded with code %ld\n", code);
return 1;
}
return 0;
}
void prepare_curl_write_callback(CURL *curl, const char *url, struct string *result)
{
curl_easy_setopt(curl, CURLOPT_URL, url);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment