]> mj.ucw.cz Git - nwho.git/commitdiff
Fixed calculation of idle time (only atime should be used)
authorMartin Mares <mj@ucw.cz>
Fri, 31 Dec 2010 15:18:00 +0000 (16:18 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 31 Dec 2010 15:18:00 +0000 (16:18 +0100)
nwhod.c

diff --git a/nwhod.c b/nwhod.c
index 1881c98ace0211fd8b8c81d017c67d88426a1b5e..5d0cee02fae186192658bf61d73da082bef5f040 100644 (file)
--- a/nwhod.c
+++ b/nwhod.c
@@ -107,10 +107,6 @@ scan_utmp(struct nwho_pkt *p, time_t now)
          continue;
        h->mesg_y = !!(S_IWGRP & st.st_mode);
        last = st.st_atime;
-       if (st.st_mtime > last)
-         last = st.st_mtime;
-       if (st.st_ctime > last)
-         last = st.st_ctime;
        if (now < last)
          last = now;
        h->idle_time = htonl(now - last);