Browse Source

Test

etomic
jl777 8 years ago
parent
commit
e7f86ecb39
  1. 1
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_stats.c

1
iguana/exchanges/LP_commands.c

@ -304,6 +304,7 @@ zeroconf_claim(address, expiration=0)\n\
struct LP_address *ap; char *coinaddr; struct LP_address *ap; char *coinaddr;
if ( (ptr= LP_coinsearch("KMD")) != 0 && (coinaddr= jstr(argjson,"address")) != 0 ) if ( (ptr= LP_coinsearch("KMD")) != 0 && (coinaddr= jstr(argjson,"address")) != 0 )
{ {
LP_statslog_parse();
LP_zeroconf_deposits(ptr); LP_zeroconf_deposits(ptr);
if ( (ap= LP_addressfind(ptr,coinaddr)) != 0 ) if ( (ap= LP_addressfind(ptr,coinaddr)) != 0 )
{ {

2
iguana/exchanges/LP_stats.c

@ -84,6 +84,7 @@ void LP_statslog_parseline(cJSON *lineobj)
int32_t LP_statslog_parse() int32_t LP_statslog_parse()
{ {
static long lastpos; FILE *fp; char line[8192]; cJSON *lineobj; int32_t n = 0; static long lastpos; FILE *fp; char line[8192]; cJSON *lineobj; int32_t n = 0;
portable_mutex_lock(&LP_logmutex);
if ( (fp= fopen(LP_STATSLOG_FNAME,"rb")) != 0 ) if ( (fp= fopen(LP_STATSLOG_FNAME,"rb")) != 0 )
{ {
if ( lastpos > 0 ) if ( lastpos > 0 )
@ -110,6 +111,7 @@ int32_t LP_statslog_parse()
} }
fclose(fp); fclose(fp);
} }
portable_mutex_unlock(&LP_logmutex);
return(n); return(n);
} }

Loading…
Cancel
Save