Browse Source

Test

etomic
jl777 7 years ago
parent
commit
ada5679cd4
  1. 8
      crypto777/bitcoind_RPC.c
  2. 8
      iguana/exchanges/mm.c

8
crypto777/bitcoind_RPC.c

@ -19,7 +19,7 @@
#include "OS_portable.h" #include "OS_portable.h"
#define LIQUIDITY_PROVIDER 1 #define LIQUIDITY_PROVIDER 1
#define malloc(n) LP_alloc(n) /*#define malloc(n) LP_alloc(n)
#define realloc(ptr,n) LP_realloc(ptr,n) #define realloc(ptr,n) LP_realloc(ptr,n)
#define calloc(a,b) LP_alloc((uint64_t)(a) * (b)) #define calloc(a,b) LP_alloc((uint64_t)(a) * (b))
#define free(ptr) LP_free(ptr) #define free(ptr) LP_free(ptr)
@ -28,7 +28,7 @@
void *LP_realloc(void *ptr,uint64_t len); void *LP_realloc(void *ptr,uint64_t len);
void *LP_alloc(uint64_t len); void *LP_alloc(uint64_t len);
void LP_free(void *ptr); void LP_free(void *ptr);
char *LP_clonestr(char *str); char *LP_clonestr(char *str);*/
#if LIQUIDITY_PROVIDER #if LIQUIDITY_PROVIDER
@ -328,9 +328,9 @@ static size_t WriteMemoryCallback(void *ptr,size_t size,size_t nmemb,void *data)
size_t needed,realsize = (size * nmemb); size_t needed,realsize = (size * nmemb);
struct MemoryStruct *mem = (struct MemoryStruct *)data; struct MemoryStruct *mem = (struct MemoryStruct *)data;
needed = mem->size + realsize + 1; needed = mem->size + realsize + 1;
if ( ptr == 0 && needed < 512 ) if ( ptr == 0 && needed < 1024 )
{ {
mem->allocsize = 512; mem->allocsize = 1024;
mem->memory = malloc(mem->allocsize); mem->memory = malloc(mem->allocsize);
} }
if ( mem->allocsize < needed ) if ( mem->allocsize < needed )

8
iguana/exchanges/mm.c

@ -27,10 +27,6 @@ void PNACL_message(char *arg,...)
} }
#define FROM_MARKETMAKER #define FROM_MARKETMAKER
#ifndef CJSON_GARBAGECOLLECTION
#define CJSON_GARBAGECOLLECTION
#endif
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#ifndef NATIVE_WINDOWS #ifndef NATIVE_WINDOWS
@ -39,7 +35,7 @@ void PNACL_message(char *arg,...)
#include "../../crypto777/OS_portable.h" #include "../../crypto777/OS_portable.h"
#endif // !_WIN_32 #endif // !_WIN_32
#define malloc(n) LP_alloc(n) /*#define malloc(n) LP_alloc(n)
#define realloc(ptr,n) LP_realloc(ptr,n) #define realloc(ptr,n) LP_realloc(ptr,n)
#define calloc(a,b) LP_alloc((uint64_t)(a) * (b)) #define calloc(a,b) LP_alloc((uint64_t)(a) * (b))
#define free(ptr) LP_free(ptr) #define free(ptr) LP_free(ptr)
@ -48,7 +44,7 @@ void PNACL_message(char *arg,...)
void *LP_realloc(void *ptr,uint64_t len); void *LP_realloc(void *ptr,uint64_t len);
void *LP_alloc(uint64_t len); void *LP_alloc(uint64_t len);
void LP_free(void *ptr); void LP_free(void *ptr);
char *LP_clonestr(char *str); char *LP_clonestr(char *str);*/
#define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b))
char *stats_JSON(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,char *remoteaddr,uint16_t port); char *stats_JSON(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,char *remoteaddr,uint16_t port);

Loading…
Cancel
Save