Browse Source

Test

etomic
jl777 8 years ago
parent
commit
dbb0ee985a
  1. 2
      crypto777/nanosrc/nn_config.h
  2. 4
      iguana/exchanges/LP_nativeDEX.c
  3. 2
      includes/iguana_defines.h

2
crypto777/nanosrc/nn_config.h

@ -56,7 +56,7 @@ void PNACL_message(const char* format, ...);
#else #else
#if !defined(WIN32) #if !defined(WIN32)
//#define NN_ENABLE_EXTRA 1 //#define NN_ENABLE_EXTRA 1
#define PNACL_message printf #define PNACL_message //printf
#include <sys/uio.h> #include <sys/uio.h>
#include <sys/un.h> #include <sys/un.h>
#endif #endif

4
iguana/exchanges/LP_nativeDEX.c

@ -347,7 +347,7 @@ void LP_mainloop(char *myipaddr,struct LP_peerinfo *mypeer,uint16_t mypubport,in
void nn_tests(int32_t pullsock,char *pushaddr) void nn_tests(int32_t pullsock,char *pushaddr)
{ {
int32_t sock,n,timeout,m=0; //void *ptr; int32_t sock,n,timeout,m=0; //void *ptr;
if ( (sock= nn_socket(AF_SP,NN_PUSH)) >= 0 ) if ( (sock= nn_socket(AF_SP,NN_BUS)) >= 0 )
{ {
if ( nn_connect(sock,pushaddr) < 0 ) if ( nn_connect(sock,pushaddr) < 0 )
printf("connect error %s\n",nn_strerror(nn_errno())); printf("connect error %s\n",nn_strerror(nn_errno()));
@ -404,7 +404,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,double profit
} else printf("error getting myipaddr\n"); } else printf("error getting myipaddr\n");
} else printf("error issuing curl\n"); } else printf("error issuing curl\n");
nanomsg_tcpname(pushaddr,myipaddr,mypullport); nanomsg_tcpname(pushaddr,myipaddr,mypullport);
if ( (pullsock= nn_socket(AF_SP,NN_PULL)) >= 0 ) if ( (pullsock= nn_socket(AF_SP,NN_BUS)) >= 0 )
{ {
timeout = 1; timeout = 1;
nn_setsockopt(pullsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout)); nn_setsockopt(pullsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));

2
includes/iguana_defines.h

@ -108,7 +108,7 @@ extern int32_t IGUANA_NUMHELPERS;
#define MS_ASYNC 1 /* Sync memory asynchronously. */ #define MS_ASYNC 1 /* Sync memory asynchronously. */
#define MS_SYNC 4 /* Synchronous memory sync. */ #define MS_SYNC 4 /* Synchronous memory sync. */
#else #else
#define PNACL_message printf #define PNACL_message //printf
#endif #endif
#ifndef WIN32 #ifndef WIN32

Loading…
Cancel
Save