diff --git a/.gitignore b/.gitignore index 7393e46d3..53b1ce827 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ *.o + +agents/iguana + +agents/libcrypto777.a diff --git a/agents/libcrypto777.a b/agents/libcrypto777.a deleted file mode 100644 index 34481851f..000000000 Binary files a/agents/libcrypto777.a and /dev/null differ diff --git a/crypto777/bitcoind_RPC.c b/crypto777/bitcoind_RPC.c index f8875ea8c..9cda47c05 100755 --- a/crypto777/bitcoind_RPC.c +++ b/crypto777/bitcoind_RPC.c @@ -103,9 +103,14 @@ char *Jay_NXTrequest(char *command,char *params) char *bitcoind_RPC(char **retstrp,char *debugstr,char *url,char *userpass,char *command,char *params) { - static int count,count2; static double elapsedsum,elapsedsum2; extern int32_t USE_JAY; + static int didinit,count,count2; static double elapsedsum,elapsedsum2; extern int32_t USE_JAY; struct curl_slist *headers = NULL; struct return_string s; CURLcode res; CURL *curl_handle; char *bracket0,*bracket1,*databuf = 0; long len; int32_t specialcase,numretries; double starttime; + if ( didinit == 0 ) + { + didinit = 1; + curl_global_init(CURL_GLOBAL_ALL); //init the curl session + } if ( USE_JAY != 0 && (strncmp(url,"http://127.0.0.1:7876/nxt",strlen("http://127.0.0.1:7876/nxt")) == 0 || strncmp(url,"https://127.0.0.1:7876/nxt",strlen("https://127.0.0.1:7876/nxt")) == 0) ) { if ( (databuf= Jay_NXTrequest(command,params)) != 0 ) diff --git a/crypto777/iguana_OS.c b/crypto777/iguana_OS.c index 189735024..40292ba4c 100755 --- a/crypto777/iguana_OS.c +++ b/crypto777/iguana_OS.c @@ -826,10 +826,8 @@ void *OS_tmpalloc(char *dirname,char *name,struct OS_memspace *mem,long origsize return(OS_portable_tmpalloc(dirname,name,mem,origsize)); } -#include void OS_init() { - curl_global_init(CURL_GLOBAL_ALL); //init the curl session SaM_PrepareIndices(); return(OS_portable_init()); } \ No newline at end of file diff --git a/iguana/m_clean b/iguana/m_clean new file mode 100755 index 000000000..47d15d969 --- /dev/null +++ b/iguana/m_clean @@ -0,0 +1 @@ +rm *.o diff --git a/iguana/m_osx b/iguana/m_osx new file mode 100755 index 000000000..5aa8b2b7d --- /dev/null +++ b/iguana/m_osx @@ -0,0 +1 @@ +gcc -Wno-deprecated -o ../agents/iguana -O2 *.c ../agents/libcrypto777.a -lssl -lcrypto -lm diff --git a/iguana/m_unix b/iguana/m_unix new file mode 100755 index 000000000..f4e7777ba --- /dev/null +++ b/iguana/m_unix @@ -0,0 +1 @@ +gcc -o ../agents/iguana -O2 *.c -lssl -lcrypto -lm diff --git a/iguana/m_win32 b/iguana/m_win32 new file mode 100755 index 000000000..216478f67 --- /dev/null +++ b/iguana/m_win32 @@ -0,0 +1 @@ +echo do equivalent of: gcc -o ../agents/iguana -O2 *.c -lssl -lcrypto -lm diff --git a/iguana/m_win64 b/iguana/m_win64 new file mode 100755 index 000000000..216478f67 --- /dev/null +++ b/iguana/m_win64 @@ -0,0 +1 @@ +echo do equivalent of: gcc -o ../agents/iguana -O2 *.c -lssl -lcrypto -lm diff --git a/tools/m_unix b/tools/m_unix index eb967f793..5456c5b80 100755 --- a/tools/m_unix +++ b/tools/m_unix @@ -1,2 +1,2 @@ git pull -make +gcc -o agent *.c libcrypto777.a