Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

clarification

  • Loading branch information...
commit c7f3d54e6df20bad97b20c59baeb6fdcbb12ed4e 1 parent 8d08145
@jonasb authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/se/forskningsavd/Communicator.java
View
8 src/se/forskningsavd/Communicator.java
@@ -96,6 +96,7 @@ public void run() {
while (mRunning) {
+ //TODO reuse buffer/modify the data
ByteBuffer buffer = ByteBuffer.allocate(1024);
buffer.put("CTRL".getBytes());
buffer.put(mTrustServer);
@@ -106,12 +107,9 @@ public void run() {
buffer.putInt(0); //dy
buffer.put((byte) 0); //kb
- // TODO why are these needed???!!1
- buffer.put((byte) 0);
- buffer.put((byte) 0);
- buffer.put((byte) 0);
- buffer.put((byte) 0);
+ //padding bytes
buffer.put((byte) 0);
+ buffer.putInt(0);
synchronized (mTrustMessages) {
if (mTrustTimeout == 0) {
Please sign in to comment.
Something went wrong with that request. Please try again.