From 1f65e42435011ee72ffd30bc41f40468a77039e7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 21 Apr 2016 16:19:59 -0500 Subject: [PATCH] test --- iguana/iguana_tx.c | 9 ++++++--- iguana/main.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/iguana/iguana_tx.c b/iguana/iguana_tx.c index 220c74fa5..b0c67ea62 100755 --- a/iguana/iguana_tx.c +++ b/iguana/iguana_tx.c @@ -26,8 +26,6 @@ int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fil { FILE *fp; long err; int32_t retval = scriptlen; #ifndef __PNACL__ - //static portable_mutex_t mutex; - //portable_mutex_lock(&mutex); if ( fileptr[0] == 0 ) fileptr[0] = (uint64_t)OS_mapfile(fname,&fileptr[1],0); if ( fileptr[0] != 0 ) @@ -44,7 +42,9 @@ int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fil fileptr[0] = fileptr[1] = 0; } } - //portable_mutex_unlock(&mutex); +#else + static portable_mutex_t mutex; + portable_mutex_lock(&mutex); #endif if ( (fp= fopen(fname,"rb")) != 0 ) { @@ -56,6 +56,9 @@ int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fil } //else printf("%s script[%d] offset.%llu read.%ld\n",fname,scriptlen,(long long)scriptpos,err); fclose(fp); } else retval = -1; +#ifdef __PNACL__ + portable_mutex_unlock(&mutex); +#endif return(retval); } diff --git a/iguana/main.c b/iguana/main.c index 47b445b3e..efa9e5e07 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -73,7 +73,7 @@ char GLOBAL_DBDIR[512] = "/DB"; char GLOBAL_HELPDIR[512] = "/DB/help"; char GLOBAL_VALIDATEDIR[512] = "/DB/purgeable"; char GLOBAL_CONFSDIR[512] = "/DB/confs"; -int32_t IGUANA_NUMHELPERS = 3; +int32_t IGUANA_NUMHELPERS = 1; #else char GLOBAL_TMPDIR[512] = "tmp"; char GLOBAL_HELPDIR[512] = "help";