Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
551feb0300
  1. 2
      iguana/iguana_json.c
  2. 4
      iguana/iguana_peers.c

2
iguana/iguana_json.c

@ -248,7 +248,7 @@ char *iguana_agentjson(char *name,struct iguana_info *coin,char *method,cJSON *j
} }
} }
} }
else if ( remoteaddr == 0 || strcmp(remoteaddr,"127.0.0.1") == 0 ) // public api else if ( remoteaddr == 0 || strcmp(remoteaddr,"127.0.0.1") != 0 ) // public api
{ {
char *coinstr; int32_t j,k,l,r,rr; struct iguana_peer *addr; char *coinstr; int32_t j,k,l,r,rr; struct iguana_peer *addr;
array = 0; array = 0;

4
iguana/iguana_peers.c

@ -726,7 +726,7 @@ int32_t iguana_pollsendQ(struct iguana_info *coin,struct iguana_peer *addr)
struct iguana_packet *packet; struct iguana_packet *packet;
if ( (packet= queue_dequeue(&addr->sendQ,0)) != 0 ) if ( (packet= queue_dequeue(&addr->sendQ,0)) != 0 )
{ {
printf("%s: send.(%s) usock.%d dead.%u ready.%u\n",addr->ipaddr,packet->serialized+4,addr->usock,addr->dead,addr->ready); //printf("%s: send.(%s) usock.%d dead.%u ready.%u\n",addr->ipaddr,packet->serialized+4,addr->usock,addr->dead,addr->ready);
if ( strcmp((char *)&packet->serialized[4],"getdata") == 0 ) if ( strcmp((char *)&packet->serialized[4],"getdata") == 0 )
{ {
printf("unexpected getdata for %s\n",addr->ipaddr); printf("unexpected getdata for %s\n",addr->ipaddr);
@ -734,6 +734,8 @@ int32_t iguana_pollsendQ(struct iguana_info *coin,struct iguana_peer *addr)
} }
else else
{ {
if ( strcmp(packet->serialized+4,"SuperNET") == 0 )
printf("deque -> (%s) -> %s\n",packet->serialized+12,addr->ipaddr);
iguana_send(coin,addr,packet->serialized,packet->datalen); iguana_send(coin,addr,packet->serialized,packet->datalen);
myfree(packet,sizeof(*packet) + packet->datalen); myfree(packet,sizeof(*packet) + packet->datalen);
return(1); return(1);

Loading…
Cancel
Save