Browse Source

Test

etomic
jl777 7 years ago
parent
commit
f38279383e
  1. 3
      crypto777/bitcoind_RPC.c

3
crypto777/bitcoind_RPC.c

@ -330,11 +330,12 @@ static size_t WriteMemoryCallback(void *ptr,size_t size,size_t nmemb,void *data)
needed = mem->size + realsize + 1; needed = mem->size + realsize + 1;
if ( ptr == 0 && needed < 512 ) if ( ptr == 0 && needed < 512 )
{ {
mem->allocsize = 511; mem->allocsize = 512;
mem->memory = malloc(mem->allocsize); mem->memory = malloc(mem->allocsize);
} }
if ( mem->allocsize < needed ) if ( mem->allocsize < needed )
{ {
printf("curl needs %d more\n",(int32_t)realsize);
mem->memory = (ptr != 0) ? realloc(mem->memory,needed) : malloc(needed); mem->memory = (ptr != 0) ? realloc(mem->memory,needed) : malloc(needed);
mem->allocsize = needed; mem->allocsize = needed;
} }

Loading…
Cancel
Save