diff --git a/VERSION b/VERSION index db7a4804..28d00753 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.31 +0.1.32 diff --git a/libnostr_core.a b/libnostr_core.a index 4b132684..063ce7c8 100644 Binary files a/libnostr_core.a and b/libnostr_core.a differ diff --git a/nostr_core/core.c b/nostr_core/core.c index 7dba034e..3cf42b67 100644 --- a/nostr_core/core.c +++ b/nostr_core/core.c @@ -249,7 +249,7 @@ typedef struct { /** * Callback function for curl to write HTTP response data */ -static size_t nip05_write_callback(void* contents, size_t size, size_t nmemb, nip05_http_response_t* response) { +static size_t nip05_write_callback(char* contents, size_t size, size_t nmemb, nip05_http_response_t* response) { size_t total_size = size * nmemb; // Check if we need to expand the buffer @@ -346,7 +346,7 @@ static int nip05_http_get(const char* url, int timeout_seconds, char** response_ curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, nip05_write_callback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); - curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout_seconds > 0 ? timeout_seconds : NIP05_DEFAULT_TIMEOUT); + curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)(timeout_seconds > 0 ? timeout_seconds : NIP05_DEFAULT_TIMEOUT)); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 0L); // NIP-05 forbids redirects curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L); @@ -935,7 +935,7 @@ int nostr_nip11_fetch_relay_info(const char* relay_url, nostr_relay_info_t** inf curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, nip05_write_callback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); - curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout_seconds > 0 ? timeout_seconds : NIP11_DEFAULT_TIMEOUT); + curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)(timeout_seconds > 0 ? timeout_seconds : NIP11_DEFAULT_TIMEOUT)); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); // NIP-11 allows redirects curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 3L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); diff --git a/nostr_core/core.o b/nostr_core/core.o index 905d766d..ce29798e 100644 Binary files a/nostr_core/core.o and b/nostr_core/core.o differ