Mercurial > 510Connectbot
comparison src/ch/ethz/ssh2/packets/PacketUserauthSuccess.java @ 308:42b15aaa7ac7 ganymed
merge
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 14:21:50 -0700 |
parents | 071eccdff8ea |
children |
comparison
equal
deleted
inserted
replaced
306:90e47d99ea54 | 308:42b15aaa7ac7 |
---|---|
23 payload = tw.getBytes(); | 23 payload = tw.getBytes(); |
24 } | 24 } |
25 | 25 |
26 public PacketUserauthSuccess(byte payload[]) throws IOException { | 26 public PacketUserauthSuccess(byte payload[]) throws IOException { |
27 this.payload = payload; | 27 this.payload = payload; |
28 | |
29 TypesReader tr = new TypesReader(payload); | 28 TypesReader tr = new TypesReader(payload); |
30 | |
31 int packet_type = tr.readByte(); | 29 int packet_type = tr.readByte(); |
32 | 30 |
33 if(packet_type != Packets.SSH_MSG_USERAUTH_SUCCESS) { | 31 if (packet_type != Packets.SSH_MSG_USERAUTH_SUCCESS) { |
34 throw new PacketTypeException(packet_type); | 32 throw new PacketTypeException(packet_type); |
35 } | 33 } |
36 if(tr.remain() != 0) { | 34 |
35 if (tr.remain() != 0) { | |
37 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type))); | 36 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type))); |
38 } | 37 } |
39 } | 38 } |
40 | 39 |
41 public byte[] getPayload() { | 40 public byte[] getPayload() { |