From 572a424f1f7e73c7fb736b47bc12dfba02daeff6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 19 Sep 2016 18:03:41 -0300 Subject: [PATCH] test --- basilisk/basilisk_MSG.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/basilisk/basilisk_MSG.c b/basilisk/basilisk_MSG.c index 5fb76ba5a..2206bc4da 100755 --- a/basilisk/basilisk_MSG.c +++ b/basilisk/basilisk_MSG.c @@ -130,10 +130,13 @@ int32_t basilisk_msgcmp(struct basilisk_message *msg,int32_t width,uint32_t chan { if ( bits256_nonz(desthash) == 0 || bits256_cmp(desthash,keydest) == 0 ) { - printf("(%d >= %d %d <= %d) key.(%u %u) channel.%u msgid.%u width.%d match.%d %d %d\n",keymsgid-width,msgid,keymsgid,msgid,keychannel,keymsgid,channel,msgid,width,keymsgid-width >= msgid,keymsgid <= msgid,keymsgid-width >= msgid && keymsgid <= msgid); - if ( keymsgid-width >= msgid && keymsgid <= msgid && keychannel == channel ) - return(0); - else return(-1); + while ( width >= 0 ) + { + if ( msgid == keymsgid && keychannel == channel ) + return(0); + msgid--; + } + return(-1); } else return(-2); } else return(-3); }