|
@ -189,7 +189,7 @@ int32_t basilisk_channelsend(struct supernet_info *myinfo,bits256 hash,uint32_t |
|
|
valsobj = cJSON_CreateObject(); |
|
|
valsobj = cJSON_CreateObject(); |
|
|
jaddnum(valsobj,"channel",channel); |
|
|
jaddnum(valsobj,"channel",channel); |
|
|
jaddnum(valsobj,"msgid",msgid); |
|
|
jaddnum(valsobj,"msgid",msgid); |
|
|
//char str[65]; printf("sendmessage.[%d] channel.%u msgid.%x -> %s\n",datalen,channel,msgid,bits256_str(str,hash));
|
|
|
char str[65]; printf("sendmessage.[%d] channel.%u msgid.%x -> %s\n",datalen,channel,msgid,bits256_str(str,hash)); |
|
|
if ( (retstr= basilisk_sendmessage(myinfo,0,0,0,hash,valsobj,hexstr)) != 0 ) |
|
|
if ( (retstr= basilisk_sendmessage(myinfo,0,0,0,hash,valsobj,hexstr)) != 0 ) |
|
|
{ |
|
|
{ |
|
|
retval = 0; |
|
|
retval = 0; |
|
@ -217,7 +217,7 @@ int32_t basilisk_message_returned(uint8_t *data,int32_t maxlen,cJSON *item) |
|
|
retval = datalen; |
|
|
retval = datalen; |
|
|
} else printf("datalen.%d < maxlen.%d\n",datalen,maxlen); |
|
|
} else printf("datalen.%d < maxlen.%d\n",datalen,maxlen); |
|
|
} else printf("no hexstr.%p or datalen.%d\n",hexstr,datalen); |
|
|
} else printf("no hexstr.%p or datalen.%d\n",hexstr,datalen); |
|
|
} //else printf("no msgobj\n");
|
|
|
} else printf("no msgobj\n"); |
|
|
return(retval); |
|
|
return(retval); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -230,7 +230,7 @@ int32_t basilisk_channelget(struct supernet_info *myinfo,bits256 hash,uint32_t c |
|
|
jaddnum(valsobj,"fanout",1); |
|
|
jaddnum(valsobj,"fanout",1); |
|
|
if ( (retstr= basilisk_getmessage(myinfo,0,0,0,hash,valsobj,0)) != 0 ) |
|
|
if ( (retstr= basilisk_getmessage(myinfo,0,0,0,hash,valsobj,0)) != 0 ) |
|
|
{ |
|
|
{ |
|
|
//printf("gotmessage.(%s)\n",retstr);
|
|
|
printf("channel.%u msgid.%u gotmessage.(%s)\n",channel,msgid,retstr); |
|
|
if ( (retarray= cJSON_Parse(retstr)) != 0 ) |
|
|
if ( (retarray= cJSON_Parse(retstr)) != 0 ) |
|
|
{ |
|
|
{ |
|
|
if ( is_cJSON_Array(retarray) != 0 ) |
|
|
if ( is_cJSON_Array(retarray) != 0 ) |
|
|