Browse Source

Test

etomic
jl777 7 years ago
parent
commit
281a757d01
  1. 14
      iguana/exchanges/LP_nativeDEX.c

14
iguana/exchanges/LP_nativeDEX.c

@ -1045,23 +1045,23 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
printf("error launching LP_psockloop for (%s)\n",myipaddr); printf("error launching LP_psockloop for (%s)\n",myipaddr);
exit(-1); exit(-1);
} }
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_reserved_msgs,(void *)myipaddr) != 0 ) if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_reserved_msgs,(void *)myipaddr) != 0 )
{ {
printf("error launching LP_reserved_msgs for (%s)\n",myipaddr); printf("error launching LP_reserved_msgs for (%s)\n",myipaddr);
exit(-1); exit(-1);
} }
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)utxosQ_loop,(void *)myipaddr) != 0 ) if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)utxosQ_loop,(void *)myipaddr) != 0 )
{ {
printf("error launching utxosQ_loop for (%s)\n",myipaddr); printf("error launching utxosQ_loop for (%s)\n",myipaddr);
exit(-1); exit(-1);
} }
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&myport) != 0 ) if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&myport) != 0 )
{ {
printf("error launching stats rpcloop for port.%u\n",myport); printf("error launching stats rpcloop for port.%u\n",myport);
exit(-1); exit(-1);
} }
uint16_t myport2 = myport-1; uint16_t myport2 = myport-1;
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&myport2) != 0 ) if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&myport2) != 0 )
{ {
printf("error launching stats rpcloop for port.%u\n",myport); printf("error launching stats rpcloop for port.%u\n",myport);
exit(-1); exit(-1);
@ -1071,12 +1071,12 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
printf("error launching command_rpcloop for port.%u\n",myport); printf("error launching command_rpcloop for port.%u\n",myport);
exit(-1); exit(-1);
} }
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)queue_loop,(void *)myipaddr) != 0 ) if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)queue_loop,(void *)myipaddr) != 0 )
{ {
printf("error launching queue_loop for port.%u\n",myport); printf("error launching queue_loop for port.%u\n",myport);
exit(-1); exit(-1);
} }
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)gc_loop,(void *)myipaddr) != 0 ) if ( 0 && OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)gc_loop,(void *)myipaddr) != 0 )
{ {
printf("error launching gc_loop for port.%u\n",myport); printf("error launching gc_loop for port.%u\n",myport);
exit(-1); exit(-1);
@ -1229,10 +1229,10 @@ void *LP_alloc(uint64_t len)
//return(calloc(1,len)); //return(calloc(1,len));
struct LP_memory_list *mp; struct LP_memory_list *mp;
mp = calloc(1,sizeof(*mp) + len); mp = calloc(1,sizeof(*mp) + len);
mp->ptr = calloc(1,len);
printf(">>>>>>>>>>> LP_alloc mp.%p ptr.%p len.%llu %llu\n",mp,mp->ptr,(long long)len,(long long)LP_cjson_allocated); printf(">>>>>>>>>>> LP_alloc mp.%p ptr.%p len.%llu %llu\n",mp,mp->ptr,(long long)len,(long long)LP_cjson_allocated);
mp->timestamp = (uint32_t)time(NULL); mp->timestamp = (uint32_t)time(NULL);
mp->len = (uint32_t)len; mp->len = (uint32_t)len;
mp->ptr = calloc(1,len);
portable_mutex_lock(&LP_cJSONmutex); portable_mutex_lock(&LP_cJSONmutex);
DL_APPEND(LP_memory_list,mp); DL_APPEND(LP_memory_list,mp);
portable_mutex_unlock(&LP_cJSONmutex); portable_mutex_unlock(&LP_cJSONmutex);

Loading…
Cancel
Save