|
|
@ -951,7 +951,12 @@ int32_t basilisk_swapget(struct supernet_info *myinfo,struct basilisk_swap *swap |
|
|
|
offset += iguana_rwnum(0,&ptr[offset],sizeof(uint32_t),&_msgbits); |
|
|
|
basilisk_swapgotdata(myinfo,swap,crc32,srchash,desthash,quoteid,_msgbits,&ptr[offset],size-offset); |
|
|
|
if ( ptr != 0 ) |
|
|
|
nn_freemsg(ptr), ptr = 0; |
|
|
|
{ |
|
|
|
fprintf(stderr,"free ptr\n"); |
|
|
|
nn_freemsg(ptr); |
|
|
|
ptr = 0; |
|
|
|
fprintf(stderr,"freed ptr\n"); |
|
|
|
} |
|
|
|
} |
|
|
|
for (i=0; i<swap->nummessages; i++) |
|
|
|
{ |
|
|
@ -983,7 +988,9 @@ uint32_t basilisk_swapsend(struct supernet_info *myinfo,struct basilisk_swap *sw |
|
|
|
memcpy(&buf[offset],data,datalen), offset += datalen; |
|
|
|
if ( (sentbytes= nn_send(swap->pushsock,buf,offset,0)) != offset ) |
|
|
|
printf("sentbytes.%d vs offset.%d\n",sentbytes,offset); |
|
|
|
fprintf(stderr,"free buf\n"); |
|
|
|
free(buf); |
|
|
|
fprintf(stderr,"freed buf\n"); |
|
|
|
return(0); |
|
|
|
} |
|
|
|
|
|
|
|