comparison src/ch/ethz/ssh2/packets/PacketOpenSessionChannel.java @ 307:071eccdff8ea ganymed

fix java formatting
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 14:16:58 -0700
parents 91a31873c42a
children
comparison
equal deleted inserted replaced
305:d2b303406d63 307:071eccdff8ea
26 payload = tw.getBytes(); 26 payload = tw.getBytes();
27 } 27 }
28 28
29 public PacketOpenSessionChannel(byte payload[]) throws IOException { 29 public PacketOpenSessionChannel(byte payload[]) throws IOException {
30 this.payload = payload; 30 this.payload = payload;
31
32 TypesReader tr = new TypesReader(payload); 31 TypesReader tr = new TypesReader(payload);
33
34 int packet_type = tr.readByte(); 32 int packet_type = tr.readByte();
35 33
36 if(packet_type != Packets.SSH_MSG_CHANNEL_OPEN) { 34 if (packet_type != Packets.SSH_MSG_CHANNEL_OPEN) {
37 throw new PacketTypeException(packet_type); 35 throw new PacketTypeException(packet_type);
38 } 36 }
39 37
40 int channelID = tr.readUINT32(); 38 int channelID = tr.readUINT32();
41 int initialWindowSize = tr.readUINT32(); 39 int initialWindowSize = tr.readUINT32();
42 int maxPacketSize = tr.readUINT32(); 40 int maxPacketSize = tr.readUINT32();
43 41
44 if(tr.remain() != 0) { 42 if (tr.remain() != 0) {
45 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type))); 43 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type)));
46 } 44 }
47 } 45 }
48 46
49 public byte[] getPayload() { 47 public byte[] getPayload() {