|
|
@ -1837,11 +1837,11 @@ void PAX_genecbsplines(struct PAX_data *dp) |
|
|
|
|
|
|
|
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 uint32_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,c; struct tai t; struct PAX_data *dp; uint8_t data[512]; |
|
|
|
if ( Currencymasks[0] == 0 ) |
|
|
|
return(0); |
|
|
|
if ( didinit == 0 ) |
|
|
|
if ( time(NULL) > didinit+12*3600 ) |
|
|
|
{ |
|
|
|
if ( (userhome= OS_filestr(&filesize,"userhome.txt")) == 0 ) |
|
|
|
userhome = "root"; |
|
|
@ -1852,15 +1852,15 @@ int32_t PAX_idle(struct supernet_info *myinfo)//struct PAX_data *argdp,int32_t i |
|
|
|
userhome[strlen(userhome)-1] = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
myinfo->PAXDATA = calloc(1,sizeof(*dp)); |
|
|
|
didinit = 1; |
|
|
|
if ( myinfo->PAXDATA == 0 ) |
|
|
|
myinfo->PAXDATA = calloc(1,sizeof(*dp)); |
|
|
|
dp = myinfo->PAXDATA; |
|
|
|
PAX_genecbsplines(dp); |
|
|
|
printf("generated splines\n"); |
|
|
|
datenum = OS_conv_unixtime(&t,&seconds,(uint32_t)time(NULL)); |
|
|
|
didinit = (uint32_t)time(NULL); |
|
|
|
datenum = OS_conv_unixtime(&t,&seconds,didinit); |
|
|
|
expand_datenum(dp->edate,datenum); |
|
|
|
} |
|
|
|
|
|
|
|
dp = myinfo->PAXDATA; |
|
|
|
/*if ( 0 && time(NULL) > dp->lastupdate+10 )
|
|
|
|
{ |
|
|
|