diff --git a/basilisk/basilisk_MSG.c b/basilisk/basilisk_MSG.c index 7b2eedf3c..514a08dac 100755 --- a/basilisk/basilisk_MSG.c +++ b/basilisk/basilisk_MSG.c @@ -216,9 +216,17 @@ char *basilisk_respond_addmessage(struct supernet_info *myinfo,uint8_t *key,int3 msg->expiration = (uint32_t)time(NULL) + duration; HASH_ADD_KEYPTR(hh,myinfo->messagetable,msg->key,msg->keylen,msg); QUEUEITEMS++; - int32_t i; for (i=0; iexpiration,msg,msg->hh.next,msg->hh.prev); + { + struct basilisk_request R; + int32_t i; for (i=0; iexpiration,msg,msg->hh.next,msg->hh.prev); + } + portable_mutex_unlock(&myinfo->messagemutex); //if ( myinfo->NOTARY.RELAYID >= 0 ) // dpow_handler(myinfo,msg); @@ -292,7 +300,7 @@ HASH_ARRAY_STRING(basilisk,sendmessage,hash,vals,hexstr) { int32_t keylen,datalen; uint8_t key[BASILISK_KEYSIZE],space[16384],*data,*ptr = 0; char *retstr=0; data = get_dataptr(BASILISK_HDROFFSET,&ptr,&datalen,&space[BASILISK_KEYSIZE],sizeof(space)-BASILISK_KEYSIZE,hexstr); - //if ( myinfo->IAMNOTARY != 0 && myinfo->NOTARY.RELAYID >= 0 ) + if ( myinfo->dexsock >= 0 || (myinfo->IAMNOTARY != 0 && myinfo->NOTARY.RELAYID >= 0) ) { keylen = basilisk_messagekey(key,juint(vals,"channel"),juint(vals,"msgid"),jbits256(vals,"srchash"),jbits256(vals,"desthash")); memcpy(space,key,BASILISK_KEYSIZE);