diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index c3ae78957..3a03962a1 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -34,6 +34,7 @@ void PNACL_message(char *arg,...) #include "../../crypto777/OS_portable.h" #endif // !_WIN_32 +int32_t DOCKERFLAG; #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); #include "stats.c" @@ -920,6 +921,7 @@ int main(int argc, const char * argv[]) } if ( argc > 1 && (retjson= cJSON_Parse(argv[1])) != 0 ) { + DOCKERFLAG = jint(retjson,"docker"); if ( (passphrase= jstr(retjson,"passphrase")) == 0 ) jaddstr(retjson,"passphrase","test"); if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)LP_main,(void *)retjson) != 0 ) diff --git a/iguana/exchanges/stats.c b/iguana/exchanges/stats.c index 7df5ec8eb..08765f940 100644 --- a/iguana/exchanges/stats.c +++ b/iguana/exchanges/stats.c @@ -815,7 +815,7 @@ void stats_rpcloop(void *args) } #endif*/ 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); closesocket(sock);