From 365378b529c6de03b973320d91099ac79b3c79d0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 25 Oct 2016 15:09:14 -0300 Subject: [PATCH] test --- src/komodo_bitcoind.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 4356ed32d..55f7d5e08 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -92,10 +92,10 @@ char *komodo_issuemethod(char *method,char *params) { static void *cHandle; extern char USERPASS[1024]; extern uint16_t BITCOIND_PORT; char url[512],*retstr=0,postdata[8192]; + if ( params == 0 || params[0] == 0 ) + params = (char *)"[]"; if ( strlen(params) < sizeof(postdata)-128 ) { - if ( params == 0 ) - params = (char *)"[]"; sprintf(url,(char *)"http://127.0.0.1:%u",BITCOIND_PORT); sprintf(postdata,"{\"method\":\"%s\",\"params\":%s}",method,params); retstr = curl_post(&cHandle,url,USERPASS,postdata,0,0,0,0);