|
@ -219,12 +219,12 @@ char *basilisk_respond_addmessage(struct supernet_info *myinfo,uint8_t *key,int3 |
|
|
msg->expiration = (uint32_t)time(NULL) + duration; |
|
|
msg->expiration = (uint32_t)time(NULL) + duration; |
|
|
HASH_ADD_KEYPTR(hh,myinfo->messagetable,msg->key,msg->keylen,msg); |
|
|
HASH_ADD_KEYPTR(hh,myinfo->messagetable,msg->key,msg->keylen,msg); |
|
|
QUEUEITEMS++; |
|
|
QUEUEITEMS++; |
|
|
int32_t i; for (i=0; i<BASILISK_KEYSIZE; i++) |
|
|
//int32_t i; for (i=0; i<BASILISK_KEYSIZE; i++)
|
|
|
printf("%02x",key[i]); |
|
|
// printf("%02x",key[i]);
|
|
|
printf(" <- ADDMSG.[%d] exp %u %p (%p %p)\n",QUEUEITEMS,msg->expiration,msg,msg->hh.next,msg->hh.prev); |
|
|
//printf(" <- ADDMSG.[%d] exp %u %p (%p %p)\n",QUEUEITEMS,msg->expiration,msg,msg->hh.next,msg->hh.prev);
|
|
|
|
|
|
portable_mutex_unlock(&myinfo->messagemutex); |
|
|
if ( sendping != 0 ) |
|
|
if ( sendping != 0 ) |
|
|
queue_enqueue("basilisk_message",&myinfo->msgQ,&msg->DL,0); |
|
|
queue_enqueue("basilisk_message",&myinfo->msgQ,&msg->DL,0); |
|
|
portable_mutex_unlock(&myinfo->messagemutex); |
|
|
|
|
|
return(clonestr("{\"result\":\"message added to hashtable\"}")); |
|
|
return(clonestr("{\"result\":\"message added to hashtable\"}")); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|