Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
899c59ea8c
  1. 3
      basilisk/basilisk_MSG.c
  2. 2
      iguana/tests/get

3
basilisk/basilisk_MSG.c

@ -99,7 +99,10 @@ char *basilisk_respond_getmessage(struct supernet_info *myinfo,uint8_t *key,int3
if ( msg != 0 )
{
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);

2
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}}"

Loading…
Cancel
Save