From b696172c5242812c4c8f286d926e3a87930e15c4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 23 Oct 2016 11:32:03 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_prices.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/iguana/dpow/dpow_prices.c b/iguana/dpow/dpow_prices.c index 9fc3d8868..fe604652b 100755 --- a/iguana/dpow/dpow_prices.c +++ b/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) { 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 ) return(0); if ( didinit == 0 ) { if ( (userhome= OS_filestr(&filesize,"userhome.txt")) == 0 ) 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)); didinit = 1; dp = myinfo->PAXDATA;