chp->lastscan=timestamp;
chp->proxies=NULL;
chp->glineid=0;
+ chp->lastgline=0;
return chp;
}
} else
for (fpp=chp->proxies;fpp;fpp=fpp->next)
- fprintf(fp, "%s %lu %u %i %u\n",IPtostr(node->prefix->sin),chp->lastscan,chp->glineid,fpp->type,fpp->port);
+ fprintf(fp, "%s %lu %u %i %u %lu\n",IPtostr(node->prefix->sin),chp->lastscan,chp->glineid,fpp->type,fpp->port,chp->lastgline);
} else {
if (chp->lastscan < (now-cleanscaninterval)) {
/* Needs rescan anyway, so delete it */
void loadcachehosts() {
FILE *fp;
- unsigned long timestamp,glineid,ptype,pport;
+ unsigned long timestamp,glineid,ptype,pport,lastgline;
char buf[512];
cachehost *chp=NULL;
foundproxy *fpp;
break;
}
- res=sscanf(buf,"%s %lu %lu %lu %lu",ip,×tamp,&glineid,&ptype,&pport);
+ res=sscanf(buf,"%s %lu %lu %lu %lu %lu",ip,×tamp,&glineid,&ptype,&pport,&lastgline);
if (res<2)
continue;
chp=addcleanhost(timestamp);
node->exts[ps_cache_ext] = chp;
- if (res==5) {
+ if (res==6) {
chp->glineid=glineid;
+ chp->lastgline=lastgline;
fpp=getfoundproxy();
fpp->type=ptype;
fpp->port=pport;