ftp works but it blocks the thread

This commit is contained in:
ading2210 2024-03-17 17:50:58 -04:00
parent 0a5ace96fb
commit 2a072ecee0
12 changed files with 165 additions and 184 deletions

View file

@ -3,7 +3,16 @@
#include "types.h"
#include "util.h"
void ftp_set_options(CURL* http_handle, const char* url, int no_body) {
curl_easy_setopt(http_handle, CURLOPT_NOBODY, (long) no_body);
curl_easy_setopt(http_handle, CURLOPT_URL, url);
void ftp_set_options(CURL* easy_handle) {
curl_easy_setopt(easy_handle, CURLOPT_VERBOSE, 1L);
}
void ftp_set_cmd(CURL* easy_handle, const char* cmd) {
struct curl_slist *cmd_list = NULL;
cmd_list = curl_slist_append(cmd_list, cmd);
curl_easy_setopt(easy_handle, CURLOPT_QUOTE, cmd_list);
curl_easy_setopt(easy_handle, CURLOPT_NOBODY, 1L);
curl_slist_free_all(cmd_list);
}