From 05347a3bf5fcc9455beb6c6b7f6a316388acbd34 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 3 May 2018 11:58:40 +0300 Subject: [PATCH] Test curl --- crypto777/bitcoind_RPC.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto777/bitcoind_RPC.c b/crypto777/bitcoind_RPC.c index 0afedd6de..b7cb967cc 100755 --- a/crypto777/bitcoind_RPC.c +++ b/crypto777/bitcoind_RPC.c @@ -143,9 +143,9 @@ char *Jay_NXTrequest(char *command,char *params) char *bitcoind_RPC(char **retstrp,char *debugstr,char *url,char *userpass,char *command,char *params,int32_t timeout) { - static int didinit,count,count2; static double elapsedsum,elapsedsum2; extern int32_t USE_JAY; + static CURL *curl_handle; static int didinit,count,count2; static double elapsedsum,elapsedsum2; extern int32_t USE_JAY; struct MemoryStruct chunk; - struct curl_slist *headers = NULL; struct return_string s; CURLcode res; CURL *curl_handle; + struct curl_slist *headers = NULL; struct return_string s; CURLcode res; char *bracket0,*bracket1,*retstr,*databuf = 0; long len; int32_t specialcase,numretries; double starttime; if ( didinit == 0 ) { @@ -243,7 +243,7 @@ try_again: //laststart = milliseconds(); res = curl_easy_perform(curl_handle); curl_slist_free_all(headers); - curl_easy_cleanup(curl_handle); + //curl_easy_cleanup(curl_handle); if ( databuf != 0 ) // clean up temporary buffer { free(databuf);