mirror of
http://galexander.org/git/simplesshd.git
synced 2024-11-30 11:18:12 +00:00
remove debug code from updater thread
This commit is contained in:
parent
a40b35a5a2
commit
5c7d92415c
@ -8,30 +8,16 @@ public class UpdaterThread extends Thread {
|
|||||||
File f = new File(Prefs.get_path(), "dropbear.err");
|
File f = new File(Prefs.get_path(), "dropbear.err");
|
||||||
long lastmod = 0;
|
long lastmod = 0;
|
||||||
long lastlen = 0;
|
long lastlen = 0;
|
||||||
System.out.println("sshd: updater start");
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (isInterrupted()) {
|
if (isInterrupted()) {
|
||||||
System.out.println("sshd: updater interrupted");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (SimpleSSHD.curr == null) {
|
if (SimpleSSHD.curr == null) {
|
||||||
System.out.println("sshd: activity stopped");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
long mod = f.lastModified();
|
long mod = f.lastModified();
|
||||||
long len = f.length();
|
long len = f.length();
|
||||||
if (mod != lastmod) {
|
if ((mod != lastmod) || (len != lastlen)) {
|
||||||
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");
|
|
||||||
SimpleSSHD.curr.runOnUiThread(new Thread() {
|
SimpleSSHD.curr.runOnUiThread(new Thread() {
|
||||||
public void run() {
|
public void run() {
|
||||||
SimpleSSHD.curr.update_log();
|
SimpleSSHD.curr.update_log();
|
||||||
@ -43,10 +29,8 @@ System.out.println("sshd: updating for len");
|
|||||||
try {
|
try {
|
||||||
sleep(1000);
|
sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
System.out.println("sshd: sleep interrupted");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("sshd: done");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user