Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
1f65e42435
  1. 9
      iguana/iguana_tx.c
  2. 2
      iguana/main.c

9
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);
}

2
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";

Loading…
Cancel
Save