From 5a319abf5be45caaf6c3ba3d40600edaf353672e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 8 Jan 2016 12:51:52 -0300 Subject: [PATCH] test --- iguana/iguana_json.c | 3 ++- iguana/iguana_recv.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/iguana_json.c b/iguana/iguana_json.c index 83071b979..7ba9d49c9 100755 --- a/iguana/iguana_json.c +++ b/iguana/iguana_json.c @@ -455,6 +455,7 @@ int32_t iguana_processjsonQ(struct iguana_info *coin) // reentrant, can be calle { if ( ptr->expired != 0 ) { + *ptr->retjsonstrp = clonestr("{\"error\":\"request timeout\"}"); printf("garbage collection: expired.(%s)\n",ptr->jsonstr); myfree(ptr,ptr->allocsize); } else queue_enqueue("finishedQ",&coin->finishedQ,&ptr->DL,0); @@ -490,7 +491,7 @@ char *iguana_blockingjsonstr(struct iguana_info *coin,char *jsonstr,uint64_t tag while ( OS_milliseconds() < expiration ) { usleep(100); - if ( (retjsonstr= *ptr->retjsonstrp) != 0 ) + if ( retjsonstr != 0 ) { //printf("blocking retjsonstr.(%s)\n",retjsonstr); queue_delete(&coin->finishedQ,&ptr->DL,allocsize,1); diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 1a12f1544..281fe6e05 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -307,7 +307,7 @@ int32_t iguana_allhashcmp(struct iguana_info *coin,struct iguana_bundle *bp,bits if ( bp->emitfinish == 0 && (block= bp->blocks[i]) != 0 && (block->queued == 0 && block->fpipbits == 0) && block->numrequests < 3 ) iguana_blockQ(coin,bp,i,block->RO.hash2,0), n++; } - printf("ALLHASHES FOUND! %d requested.%d\n",bp->bundleheight,n); + //printf("ALLHASHES FOUND! %d requested.%d\n",bp->bundleheight,n); return(i); } } @@ -561,7 +561,7 @@ int32_t iguana_reqhdrs(struct iguana_info *coin) char str[65]; bits256_str(str,bp->hashes[0]); //printf("(%s %d).%d ",str,bp->bundleheight,i); - printf("%d ",bp->bundleheight); + //printf("%d ",bp->bundleheight); init_hexbytes_noT(hashstr,bp->hashes[0].bytes,sizeof(bits256)); queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(hashstr),1); /*if ( strcmp(coin->symbol,"BTC") != 0 && bits256_nonz(bp->hashes[1]) > 0 )