From 14d67cbe55da640571c703dd102c57bbec5cea02 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 3 Jul 2016 02:18:12 -0300 Subject: [PATCH] test --- basilisk/basilisk_swap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basilisk/basilisk_swap.c b/basilisk/basilisk_swap.c index 77672e702..423fee78d 100755 --- a/basilisk/basilisk_swap.c +++ b/basilisk/basilisk_swap.c @@ -527,13 +527,13 @@ void basilisk_swaploop(void *_swap) fprintf(stderr,"swapstate.%x\n",swap->statebits); if ( (swap->statebits & 0x01) == 0 ) // wait for pubkeys { - if ( basilisk_swapget(myinfo,swap,0x01,data,maxlen,basilisk_verify_otherdeck) == 0 ) - swap->statebits |= 0x01; + datalen = basilisk_swapdata_deck(myinfo,swap,data,maxlen); + swap->statebits |= basilisk_swapsend(myinfo,swap,0x02,data,datalen,0x01); } else if ( (swap->statebits & 0x02) == 0 ) // send pubkeys { - datalen = basilisk_swapdata_deck(myinfo,swap,data,maxlen); - swap->statebits |= basilisk_swapsend(myinfo,swap,0x01,data,datalen,0x02); + if ( basilisk_swapget(myinfo,swap,0x02,data,maxlen,basilisk_verify_otherdeck) == 0 ) + swap->statebits |= 0x02; } else if ( (swap->statebits & 0x04) == 0 ) // send choosei {