jl777 8 years ago
parent
commit
4d1e5de053
  1. 4
      iguana/dpow/dpow_network.c

4
iguana/dpow/dpow_network.c

@ -48,7 +48,7 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,char *ipaddr)
char str[512]; uint32_t ipbits; int32_t i,n,retval = -1; char str[512]; uint32_t ipbits; int32_t i,n,retval = -1;
if ( myinfo->dpowsock >= 0 && strcmp(ipaddr,myinfo->ipaddr) != 0 ) if ( myinfo->dpowsock >= 0 && strcmp(ipaddr,myinfo->ipaddr) != 0 )
{ {
portable_mutex_lock(myinfo->dpowmutex); portable_mutex_lock(&myinfo->dpowmutex);
n = myinfo->numdpowipbits; n = myinfo->numdpowipbits;
ipbits = (uint32_t)calc_ipbits(ipaddr); ipbits = (uint32_t)calc_ipbits(ipaddr);
for (i=0; i<n; i++) for (i=0; i<n; i++)
@ -62,7 +62,7 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,char *ipaddr)
printf("addnotary.[%d] (%s) retval.%d\n",n,ipaddr,retval); printf("addnotary.[%d] (%s) retval.%d\n",n,ipaddr,retval);
myinfo->numdpowipbits++; myinfo->numdpowipbits++;
} }
portable_mutex_unlock(myinfo->dpowmutex); portable_mutex_unlock(&myinfo->dpowmutex);
} }
return(retval); return(retval);
} }

Loading…
Cancel
Save