diff --git a/basilisk/basilisk_MSG.c b/basilisk/basilisk_MSG.c index 7a24a7a5e..0665fcecc 100755 --- a/basilisk/basilisk_MSG.c +++ b/basilisk/basilisk_MSG.c @@ -98,8 +98,11 @@ char *basilisk_respond_getmessage(struct supernet_info *myinfo,uint8_t *key,int3 HASH_FIND(hh,myinfo->messagetable,key,keylen,msg); if ( msg != 0 ) { - if ( basilisk_addhexstr(&ptr,retjson,strbuf,sizeof(strbuf),msg->data,msg->datalen) != 0 ) - jaddstr(retjson,"result","success"); + if ( basilisk_addhexstr(&ptr,retjson,strbuf,sizeof(strbuf),msg->data,msg->datalen) != 0 ) + { + jaddstr(retjson,"result","success"); + printf("getmessage.(%s)\n",jprint(retjson,0)); + } else jaddstr(retjson,"error","couldnt add message"); } else jaddstr(retjson,"error","no message"); portable_mutex_unlock(&myinfo->messagemutex); diff --git a/iguana/tests/get b/iguana/tests/get index 8ec012705..fa1f49360 100755 --- a/iguana/tests/get +++ b/iguana/tests/get @@ -1 +1 @@ -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"basilisk\",\"method\":\"get\",\"vals\":{\"chain\":\"test\"}}" +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"basilisk\",\"method\":\"getmessage\",\"vals\":{\"channel\":12345,\"msgid\":1}}"