Initial Working version of IoTCloudv2, needs more testing
[iotcloud.git] / src2 / java / iotcloud / NewKey.java
index c101c0bb17b55ddbe5c7ef499d847a16c2753633..0970016c322595bcc342e9c1ba0c863c8393e805 100644 (file)
@@ -37,14 +37,14 @@ class NewKey extends Entry {
        }
 
        public void encode(ByteBuffer bb) {
-               bb.put(Entry.TypeAbort);
+               bb.put(Entry.TypeNewKey);
                bb.putInt(key.length());
                bb.put(key.internalBytes());
                bb.putLong(machineid);
        }
 
        public int getSize() {
-               return Long.BYTES + Byte.BYTES + key.length();
+               return Long.BYTES + Byte.BYTES + Integer.BYTES + key.length();
        }
 
        public byte getType() {