Rearrange idle time checks in check_idle
This commit is contained in:
		
							parent
							
								
									fd6525652d
								
							
						
					
					
						commit
						a60ff18d3c
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -878,13 +878,13 @@ void check_idle() | ||||||
|      * current time less last modified time |      * current time less last modified time | ||||||
|      */ |      */ | ||||||
| #ifdef TIMEOUTDX11 | #ifdef TIMEOUTDX11 | ||||||
|     if (chk_xsession(dev, host) && !chk_xterm(dev, host)) {     /* check idle for Xsession, but not for xterm */ |     if (chk_xterm(dev, host)) { | ||||||
|  |         return; | ||||||
|  |     } else if (chk_xsession(dev, host)) {     /* check idle for Xsession, but not for xterm */ | ||||||
|         idle = get_xidle(user, host) / 1000 / 60;       /* get_xidle returns millisecs, we need mins */ |         idle = get_xidle(user, host) / 1000 / 60;       /* get_xidle returns millisecs, we need mins */ | ||||||
|         syslog(LOG_DEBUG, "get_xidle(%s,%s) returned %d mins idle for %s.", dev, host, |         syslog(LOG_DEBUG, "get_xidle(%s,%s) returned %d mins idle for %s.", dev, host, | ||||||
|                (int) idle, user); |                (int) idle, user); | ||||||
|     } else if (chk_xterm(dev, host)) |     } else | ||||||
|         return; |  | ||||||
|     else |  | ||||||
| #endif | #endif | ||||||
|         idle = (time_now - max(pstat->st_atime, pstat->st_mtime)) / 60; |         idle = (time_now - max(pstat->st_atime, pstat->st_mtime)) / 60; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Petar Kapris
						Petar Kapris