|
|
@ -23,7 +23,7 @@ |
|
|
|
#include <curl/easy.h> |
|
|
|
#endif |
|
|
|
|
|
|
|
#define issue_curl(cmdstr) bitcoind_RPC(0,(char *)"curl",(char *)"http://127.0.0.1:7776",0,0,(char *)(cmdstr))
|
|
|
|
//#define issue_curl(cmdstr) bitcoind_RPC(0,(char *)"curl",(char *)"http://127.0.0.1:7776",0,0,(char *)(cmdstr))
|
|
|
|
|
|
|
|
struct MemoryStruct { char *memory; size_t size; }; |
|
|
|
struct return_string { char *ptr; size_t len; }; |
|
|
@ -196,7 +196,7 @@ try_again: |
|
|
|
|
|
|
|
databuf = (char *)malloc(256 + strlen(command) + strlen(params)); |
|
|
|
sprintf(databuf,"{\"id\":\"jl777\",\"method\":\"%s\",\"params\":%s%s%s}",command,bracket0,params,bracket1); |
|
|
|
//printf("url.(%s) userpass.(%s) databuf.(%s)\n",url,userpass,databuf);
|
|
|
|
printf("url.(%s) userpass.(%s) databuf.(%s)\n",url,userpass,databuf); |
|
|
|
//
|
|
|
|
} //else if ( specialcase != 0 ) fprintf(stderr,"databuf.(%s)\n",params);
|
|
|
|
curl_easy_setopt(curl_handle,CURLOPT_POST,1L); |
|
|
@ -339,7 +339,7 @@ char *komodo_issuemethod(char *userpass,char *method,char *params,uint16_t port) |
|
|
|
{ |
|
|
|
sprintf(url,(char *)"http://127.0.0.1:%u",port); |
|
|
|
sprintf(postdata,"{\"method\":\"%s\",\"params\":%s}",method,params); |
|
|
|
//printf("postdata.(%s) USERPASS.(%s)\n",postdata,KMDUSERPASS);
|
|
|
|
printf("[%s] (%s) postdata.(%s) params.(%s) USERPASS.(%s)\n",ASSETCHAINS_SYMBOL,url,postdata,params,KMDUSERPASS); |
|
|
|
retstr2 = bitcoind_RPC(&retstr,(char *)"debug",url,userpass,method,params); |
|
|
|
//retstr = curl_post(&cHandle,url,USERPASS,postdata,0,0,0,0);
|
|
|
|
} |
|
|
|