Permalink
Browse files

clarification

  • Loading branch information...
1 parent 8d08145 commit c7f3d54e6df20bad97b20c59baeb6fdcbb12ed4e @jonasb committed Jan 5, 2012
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) {

0 comments on commit c7f3d54

Please sign in to comment.