diff --git a/src/org/galexander/sshd/UpdaterThread.java b/src/org/galexander/sshd/UpdaterThread.java index fc1328a..40446c8 100644 --- a/src/org/galexander/sshd/UpdaterThread.java +++ b/src/org/galexander/sshd/UpdaterThread.java @@ -8,30 +8,16 @@ public class UpdaterThread extends Thread { File f = new File(Prefs.get_path(), "dropbear.err"); long lastmod = 0; long lastlen = 0; -System.out.println("sshd: updater start"); while (true) { if (isInterrupted()) { -System.out.println("sshd: updater interrupted"); break; } if (SimpleSSHD.curr == null) { -System.out.println("sshd: activity stopped"); break; } long mod = f.lastModified(); long len = f.length(); - if (mod != lastmod) { -System.out.println("sshd: updating for time"); - SimpleSSHD.curr.runOnUiThread(new Thread() { - public void run() { - SimpleSSHD.curr.update_log(); - } - }); - lastmod = mod; - lastlen = len; - } - if (len != lastlen) { -System.out.println("sshd: updating for len"); + if ((mod != lastmod) || (len != lastlen)) { SimpleSSHD.curr.runOnUiThread(new Thread() { public void run() { SimpleSSHD.curr.update_log(); @@ -43,10 +29,8 @@ System.out.println("sshd: updating for len"); try { sleep(1000); } catch (InterruptedException e) { -System.out.println("sshd: sleep interrupted"); break; } } -System.out.println("sshd: done"); } }