Rev 18509 | Rev 18514 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 18509 | Rev 18510 | ||
---|---|---|---|
Line 98... | Line 98... | ||
98 | if(!hardcheck || strchr(session_name,'_')!=NULL) continue; |
98 | if(!hardcheck || strchr(session_name,'_')!=NULL) continue; |
99 | /* keep very new sessions (inactive for less than idle_time3 seconds) */ |
99 | /* keep very new sessions (inactive for less than idle_time3 seconds) */ |
100 | if(session_stat.st_mtime>=nowtime-idle_time3 && |
100 | if(session_stat.st_mtime>=nowtime-idle_time3 && |
101 | session_stat.st_mtime<nowtime+anti_time) continue; |
101 | session_stat.st_mtime<nowtime+anti_time) continue; |
102 | /* for sessions inactive for more than idle_time3 seconds, |
102 | /* for sessions inactive for more than idle_time3 seconds, |
103 | keep session if var.stat file exists |
103 | keep session if var.stat file exists and wims_class variable is defined |
- | 104 | */ |
|
104 | snprintf(fbuf,sizeof(fbuf),"%s/var.stat",session_name); |
105 | snprintf(fbuf,sizeof(fbuf),"%s/var.stat",session_name); |
- | 106 | wlogdaccessfile(fbuf,"r","%s/var.stat",session_name); |
|
105 | if( |
107 | if(fbuf[0]!= 0 && strstr(fbuf,"\nwims_class=")!=NULL) continue; |
106 | /* sessions with no var.stat file, chech var file */ |
108 | /* sessions with no var.stat file, chech var file */ |
107 | wlogdaccessfile(cbuf,"r","%s/var",session_name); |
109 | wlogdaccessfile(cbuf,"r","%s/var",session_name); |
108 | if(cbuf[0]==0) goto remove; /* no var file, remove */ |
110 | if(cbuf[0]==0) goto remove; /* no var file, remove */ |
109 | /* keep manager sessions */ |
111 | /* keep manager sessions */ |
110 | pp=strstr(cbuf,"\nw_wims_ismanager="); |
112 | pp=strstr(cbuf,"\nw_wims_ismanager="); |