Commit f7489c89 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Save the node status (with "downloading" action value)

More immediately. I wanted to debug the ETA value here and the action wasn't written to the node file here, but later.
parent c524eca2
Pipeline #2891 failed with stage
in 10 minutes and 7 seconds
......@@ -1030,12 +1030,14 @@ int sbbs_t::listfileinfo(uint dirnum, const char *filespec, long mode)
}
}
}
getnodedat(cfg.node_num,&thisnode,1);
action=NODE_DLNG;
t=now + gettimetodl(&cfg, f, cur_cps);
localtime_r(&t,&tm);
thisnode.aux=(tm.tm_hour*60)+tm.tm_min;
putnodedat(cfg.node_num,&thisnode); /* calculate ETA */
action = NODE_DLNG;
if(getnodedat(cfg.node_num,&thisnode,true) == 0) {
thisnode.action = action;
t=now + gettimetodl(&cfg, f, cur_cps);
localtime_r(&t,&tm);
thisnode.aux=(tm.tm_hour*60)+tm.tm_min;
putnodedat(cfg.node_num,&thisnode); /* calculate ETA */
}
start=time(NULL);
error=protocol(cfg.prot[i],XFER_DOWNLOAD,path,nulstr,false);
end=time(NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment