]> Git Repo - VerusCoin.git/commitdiff
test
authorjl777 <[email protected]>
Thu, 27 Oct 2016 13:20:00 +0000 (10:20 -0300)
committerjl777 <[email protected]>
Thu, 27 Oct 2016 13:20:00 +0000 (10:20 -0300)
src/komodo_notary.h
src/komodo_utils.h

index 62b03dfdd5d9151047fd58b219465557bf0187d7..45d2249c883492f753dfacaaee6cbebb4009cfbf 100644 (file)
@@ -198,8 +198,8 @@ void komodo_init()
     if ( didinit == 0 )
     {
         didinit = 1;
-        iguana_initQ(&DepositsQ,"Deposits");
-        iguana_initQ(&PendingsQ,"Pendings");
+        iguana_initQ(&DepositsQ,(char *)"Deposits");
+        iguana_initQ(&PendingsQ,(char *)"Pendings");
         pthread_mutex_init(&komodo_mutex,NULL);
         decode_hex(NOTARY_PUBKEY33,33,(char *)NOTARY_PUBKEY.c_str());
         n = (int32_t)(sizeof(Notaries)/sizeof(*Notaries));
index 460f5e8bb969b2b4a1ede859c82c943429a9b520..08bd5ca389070cde1e03812cc082484c3d1f02d4 100644 (file)
@@ -1128,6 +1128,13 @@ void myfree(void *_ptr,long allocsize)
     free(item);
 }
 
+void free_queueitem(void *itemdata)
+{
+    struct queueitem *item = (void *)((long)itemdata - sizeof(struct queueitem));
+    //printf("freeq item.%p itemdata.%p size.%d\n",item,itemdata,item->allocsize);
+    _myfree(item->type,item->allocsize,item,item->allocsize);
+}
+
 void *mycalloc(uint8_t type,int32_t n,long itemsize)
 {
     struct allocitem *item; int64_t allocsize = ((uint64_t)n * itemsize);
@@ -1284,7 +1291,7 @@ void iguana_initQ(queue_t *Q,char *name)
     char *tst,*str = (char *)"need to init each Q when single threaded";
     memset(Q,0,sizeof(*Q));
     strcpy(Q->name,name);
-    queue_enqueue(name,Q,queueitem(str),1);
-    if ( (tst= queue_dequeue(Q,1)) != 0 )
+    queue_enqueue(name,Q,(struct queueitem *)queueitem(str),1);
+    if ( (tst= (char *)queue_dequeue(Q,1)) != 0 )
         free_queueitem(tst);
 }
This page took 0.026887 seconds and 4 git commands to generate.