diff src/org/tn5250j/framework/tn5250/tnvt.java @ 414:12b2a3a35afe

more debugging looking for duplicate transmission
author Carl Byington <carl@five-ten-sg.com>
date Sat, 25 Oct 2014 10:52:39 -0700
parents da2814f6f05e
children 09c1d3aae3f0
line wrap: on
line diff
--- a/src/org/tn5250j/framework/tn5250/tnvt.java	Fri Oct 24 19:02:32 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/tnvt.java	Sat Oct 25 10:52:39 2014 -0700
@@ -416,18 +416,6 @@
         bout.flush();
     }
 
-    //  private final void writeByte(byte byte0) throws IOException {
-    //
-    //      bout.write(byte0);
-    //      bout.flush();
-    //  }
-
-    public final void sendHeartBeat() throws IOException {
-        byte[] b = { (byte) 0xff, (byte) 0xf1 };
-        bout.write(b);
-        bout.flush();
-    }
-
     private final void readImmediate(int readType) {
         if (screen52.isStatusErrorCode()) {
             screen52.restoreErrorLine();
@@ -449,11 +437,11 @@
         screen52.getScreenFields().readFormatTable(baosp, readType, codePage);
 
         try {
+            Log.i(TAG, "readImmediate() writeGDS()");
             writeGDS(0, 3, baosp.toByteArray());
         }
         catch (IOException ioe) {
             Log.w(TAG, ioe.getMessage());
-            baosp.reset();
         }
 
         baosp.reset();
@@ -486,6 +474,7 @@
                     codePage);
 
         try {
+            Log.i(TAG, "sendAidKey() writeGDS()");
             writeGDS(0, 3, baosp.toByteArray());
         }
         catch (IOException ioe) {
@@ -595,6 +584,7 @@
         baosp.write(AID_HELP);
 
         try {
+            Log.i(TAG, "sendHelpRequest() writeGDS()");
             writeGDS(0, 3, baosp.toByteArray());
         }
         catch (IOException ioe) {
@@ -624,6 +614,7 @@
 
         //      System.out.println("Attention key sent");
         try {
+            Log.i(TAG, "sendAttentionKey() writeGDS()");
             writeGDS(0x40, 0, null);
         }
         catch (IOException ioe) {
@@ -672,6 +663,7 @@
         }
 
         try {
+            Log.i(TAG, "systemRequest() writeGDS()");
             writeGDS(4, 0, bytes);
         }
         catch (IOException ioe) {
@@ -702,6 +694,7 @@
         // indicate that the work station is
         // no longer invited.
         try {
+            Log.i(TAG, "cancelInvite() writeGDS()");
             writeGDS(0, 10, null);
         }
         catch (IOException ioe) {
@@ -742,6 +735,7 @@
         baosp.write(AID_PRINT); // aid key
 
         try {
+            Log.i(TAG, "hostPrint() writeGDS()");
             writeGDS(0, 3, baosp.toByteArray());
         }
         catch (IOException ioe) {
@@ -807,11 +801,7 @@
         baosrsp.write(IAC);
         baosrsp.write(EOR);
         baosrsp.writeTo(bout);
-        //        byte[] b = new byte[baosrsp.size()];
-        //        b = baosrsp.toByteArray();
-        //      dump(b);
         bout.flush();
-        //      baos = null;
         baosrsp.reset();
     }
 
@@ -819,11 +809,6 @@
         return bk.getOpCode();
     }
 
-    //  private final void sendNotify() throws IOException {
-    //
-    //      writeGDS(0, 0, null);
-    //  }
-
     protected boolean[] getActiveAidKeys() {
         boolean aids[] = new boolean[dataIncluded.length];
         System.arraycopy(dataIncluded, 0, aids, 0, dataIncluded.length);
@@ -1132,6 +1117,7 @@
         int cols = screen52.getColumns();
         byte abyte0[] = new byte[rows * cols];
         fillScreenArray(abyte0, rows, cols);
+        Log.i(TAG, "readScreen() writeGDS()");
         writeGDS(0, 0, abyte0);
         abyte0 = null;
     }
@@ -1283,6 +1269,7 @@
         //      screen52.clearTable();
 
         try {
+            Log.i(TAG, "saveScreen() writeGDS()");
             writeGDS(0, 3, sc.toByteArray());
         }
         catch (IOException ioe) {
@@ -1622,6 +1609,7 @@
         baosp.write(uByte2);
 
         try {
+            Log.i(TAG, "sendNegResponse() writeGDS()");
             writeGDS(128, 0, baosp.toByteArray());
         }
         catch (IOException ioe) {
@@ -1637,6 +1625,7 @@
         baosp.write(ec);
 
         try {
+            Log.i(TAG, "sendNegResponse2() writeGDS()");
             writeGDS(1, 0, baosp.toByteArray());
         }
         catch (IOException ioe) {
@@ -2344,6 +2333,7 @@
         abyte0[61] = 0; // gridlines are not supported
         abyte0[62] = 0; // gridlines are not supported
         abyte0[63] = 0;
+        Log.i(TAG, "sendQueryResponse() writeGDS()");
         writeGDS(0, 0, abyte0); // now tell them about us
         abyte0 = null;
     }