Browse Source

Test

etomic
jl777 7 years ago
parent
commit
abec70cf5a
  1. 2
      iguana/exchanges/mm.c
  2. 2
      iguana/exchanges/stats.c

2
iguana/exchanges/mm.c

@ -34,6 +34,7 @@ void PNACL_message(char *arg,...)
#include "../../crypto777/OS_portable.h" #include "../../crypto777/OS_portable.h"
#endif // !_WIN_32 #endif // !_WIN_32
int32_t DOCKERFLAG;
#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);
#include "stats.c" #include "stats.c"
@ -920,6 +921,7 @@ int main(int argc, const char * argv[])
} }
if ( argc > 1 && (retjson= cJSON_Parse(argv[1])) != 0 ) if ( argc > 1 && (retjson= cJSON_Parse(argv[1])) != 0 )
{ {
DOCKERFLAG = jint(retjson,"docker");
if ( (passphrase= jstr(retjson,"passphrase")) == 0 ) if ( (passphrase= jstr(retjson,"passphrase")) == 0 )
jaddstr(retjson,"passphrase","test"); jaddstr(retjson,"passphrase","test");
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_main,(void *)retjson) != 0 ) if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_main,(void *)retjson) != 0 )

2
iguana/exchanges/stats.c

@ -815,7 +815,7 @@ void stats_rpcloop(void *args)
} }
#endif*/ #endif*/
memcpy(&ipbits,&cli_addr.sin_addr.s_addr,sizeof(ipbits)); memcpy(&ipbits,&cli_addr.sin_addr.s_addr,sizeof(ipbits));
if ( port == RPC_port && ipbits != localhostbits ) if ( DOCKERFLAG == 0 && port == RPC_port && ipbits != localhostbits )
{ {
//printf("port.%u RPC_port.%u ipbits %x != %x\n",port,RPC_port,ipbits,localhostbits); //printf("port.%u RPC_port.%u ipbits %x != %x\n",port,RPC_port,ipbits,localhostbits);
closesocket(sock); closesocket(sock);

Loading…
Cancel
Save