Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
67eca37ddf
  1. 1
      basilisk/basilisk_MSG.c

1
basilisk/basilisk_MSG.c

@ -50,6 +50,7 @@ char *basilisk_respond_addmessage(struct supernet_info *myinfo,uint8_t *key,int3
cJSON *basilisk_respond_getmessage(struct supernet_info *myinfo,uint8_t *key,int32_t keylen) cJSON *basilisk_respond_getmessage(struct supernet_info *myinfo,uint8_t *key,int32_t keylen)
{ {
cJSON *msgjson=0; struct basilisk_message *msg; char *ptr = 0,strbuf[32768]; cJSON *msgjson=0; struct basilisk_message *msg; char *ptr = 0,strbuf[32768];
{int32_t i; for (i=0; i<keylen; i++) printf("%02x",key[i]); printf(" search key\n");}
portable_mutex_lock(&myinfo->messagemutex); portable_mutex_lock(&myinfo->messagemutex);
HASH_FIND(hh,myinfo->messagetable,key,keylen,msg); HASH_FIND(hh,myinfo->messagetable,key,keylen,msg);
if ( msg != 0 ) if ( msg != 0 )

Loading…
Cancel
Save