jl777 8 years ago
parent
commit
b696172c52
  1. 11
      iguana/dpow/dpow_prices.c

11
iguana/dpow/dpow_prices.c

@ -1755,13 +1755,22 @@ void PAX_genecbsplines(struct PAX_data *dp)
int32_t PAX_idle(struct supernet_info *myinfo)//struct PAX_data *argdp,int32_t idlegap) int32_t PAX_idle(struct supernet_info *myinfo)//struct PAX_data *argdp,int32_t idlegap)
{ {
static double lastupdate,lastdayupdate; static int32_t didinit; static char *userhome; int32_t idlegap = 10; static double lastupdate,lastdayupdate; static int32_t didinit; static char *userhome; int32_t idlegap = 10;
FILE *fp; long filesize; char fname[512]; double splineval; uint32_t pvals[128],timestamp; int32_t i,datenum,seconds; struct tai t; struct PAX_data *dp; uint8_t data[512]; FILE *fp; long filesize; char fname[512]; double splineval; uint32_t pvals[128],timestamp; int32_t i,datenum,seconds,c; struct tai t; struct PAX_data *dp; uint8_t data[512];
if ( Currencymasks[0] == 0 ) if ( Currencymasks[0] == 0 )
return(0); return(0);
if ( didinit == 0 ) if ( didinit == 0 )
{ {
if ( (userhome= OS_filestr(&filesize,"userhome.txt")) == 0 ) if ( (userhome= OS_filestr(&filesize,"userhome.txt")) == 0 )
userhome = "root"; userhome = "root";
else
{
if ( (c= userhome[strlen(userhome)-1]) == '\r' || c == '\n' || c == ' ' || c == '\t' )
{
userhome[strlen(userhome)-1] = 0;
if ( (c= userhome[strlen(userhome)-1]) == '\r' || c == '\n' || c == ' ' || c == '\t' )
userhome[strlen(userhome)-1] = 0;
}
}
myinfo->PAXDATA = calloc(1,sizeof(*dp)); myinfo->PAXDATA = calloc(1,sizeof(*dp));
didinit = 1; didinit = 1;
dp = myinfo->PAXDATA; dp = myinfo->PAXDATA;

Loading…
Cancel
Save