From bf84f287cc12c09d2406b277596aa966840d778a Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Sep 2016 09:32:04 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index f7abeb04d..598a255b8 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -375,7 +375,7 @@ struct basilisk_item *basilisk_issueremote(struct supernet_info *myinfo,struct i if ( (retarray= pending->retarray) != 0 ) { pending->retstr = jprint(retarray,0); - //printf("num.%d:%d required.%d RETSTR.(%s)\n",pending->numresults,cJSON_GetArraySize(pending->retarray),pending->numrequired,pending->retstr); + printf("num.%d:%d required.%d RETSTR.(%s)\n",pending->numresults,cJSON_GetArraySize(pending->retarray),pending->numrequired,pending->retstr); pending->retarray = 0; free_json(retarray); } @@ -401,8 +401,8 @@ struct basilisk_item *basilisk_requestservice(struct supernet_info *myinfo,struc if ( (timeoutmillis= jint(valsobj,"timeout")) == 0 ) timeoutmillis = BASILISK_TIMEOUT; minfanout = sqrt(myinfo->NOTARY.NUMRELAYS)+1; - if ( minfanout < 5 ) - minfanout = 5; + if ( minfanout < 8 ) + minfanout = 8; if ( jobj(valsobj,"fanout") == 0 ) fanout = minfanout; else fanout = jint(valsobj,"fanout"); @@ -447,15 +447,15 @@ char *basilisk_standardservice(char *CMD,struct supernet_info *myinfo,void *_add if ( ptr->numsent > 0 ) { //queue_enqueue("submitQ",&myinfo->basilisks.submitQ,&ptr->DL,0); - jaddstr(retjson,"result","success"); + jaddstr(retjson,"result","error"); jaddnum(retjson,"numsent",ptr->numsent); } else jaddstr(retjson,"error","didnt find any nodes to send to"); retstr = jprint(retjson,1); } ptr->finished = (uint32_t)time(NULL); } - if ( strcmp("MSG",CMD) == 0 ) - printf("%s.(%s) -> (%s)\n",CMD,jprint(valsobj,0),retstr!=0?retstr:""); + //if ( strcmp("MSG",CMD) == 0 ) + // printf("%s.(%s) -> (%s)\n",CMD,jprint(valsobj,0),retstr!=0?retstr:""); return(retstr); } @@ -600,7 +600,7 @@ void basilisk_result(struct supernet_info *myinfo,char *remoteaddr,uint32_t basi jaddi(pending->retarray,item); if ( jobj(item,"error") == 0 ) { - //printf("numresults.%d:%d\n",pending->numresults,cJSON_GetArraySize(pending->retarray)); + printf("numresults.%d:%d\n",pending->numresults,cJSON_GetArraySize(pending->retarray)); pending->numresults++; } } else printf("couldnt parse.(%s)\n",retstr);