Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/service/TerminalMonitor.java @ 401:977815f990ec
Backed out changeset 2a416391ffc3
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 20 Oct 2014 19:14:10 -0700 |
parents | e856ecf87b10 |
children | 14aa0621aa7d |
comparison
equal
deleted
inserted
replaced
400:e856ecf87b10 | 401:977815f990ec |
---|---|
88 public void run() { | 88 public void run() { |
89 char [] c; | 89 char [] c; |
90 try { | 90 try { |
91 while (!is_closing) { | 91 while (!is_closing) { |
92 c = pending_commands.take(); | 92 c = pending_commands.take(); |
93 //Log.i(TAG, String.format("sending %d command", (int)c[1])); | 93 c[0] = (char)(c.length - 1); // number of chars following |
94 c[1] = cmd; | |
95 //Log.i(TAG, String.format("sending %d command", (int)cmd)); | |
94 monitor_out.write(charsToBytes(c)); | 96 monitor_out.write(charsToBytes(c)); |
95 } | 97 } |
96 } | 98 } |
97 catch (InterruptedException e) { | 99 catch (InterruptedException e) { |
98 if (!is_closing) Log.e(TAG, "exception in monitorWrite()", e); | 100 if (!is_closing) Log.e(TAG, "exception in monitorWrite()", e); |
346 return b; | 348 return b; |
347 } | 349 } |
348 | 350 |
349 | 351 |
350 public void monitorWrite(char cmd, char[] c) { | 352 public void monitorWrite(char cmd, char[] c) { |
351 c[0] = (char)(c.length - 1); // number of chars following | |
352 c[1] = cmd; | 353 c[1] = cmd; |
353 pending_commands.put(c); | 354 pending_commands.put(c); |
354 }; | 355 }; |
355 | 356 |
356 public void resetWatch() { | 357 public void resetWatch() { |