aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/main/java/com/trilead/ssh2/packets
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2009-01-23 14:19:46 +0000
committerKenny Root <kenny@the-b.org>2009-01-23 14:19:46 +0000
commitb1f8f94ff046f59958bb5af0534aab81d1d8d9d4 (patch)
tree39e45f6d7c074a110ab9704f38c1a566c5e8c343 /lib/src/main/java/com/trilead/ssh2/packets
parent569080860fc43408b0c009508b7ad452120f1a6c (diff)
downloadsshlib-b1f8f94ff046f59958bb5af0534aab81d1d8d9d4.tar.gz
sshlib-b1f8f94ff046f59958bb5af0534aab81d1d8d9d4.tar.bz2
sshlib-b1f8f94ff046f59958bb5af0534aab81d1d8d9d4.zip
Comply with RFC 4254 on window-change packet
* Always send false for "want reply" * We don't need to wait since a reply should not be sent. * Allow the sending of (informational) pixel dimensions.
Diffstat (limited to 'lib/src/main/java/com/trilead/ssh2/packets')
-rw-r--r--lib/src/main/java/com/trilead/ssh2/packets/PacketSessionPtyResize.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/src/main/java/com/trilead/ssh2/packets/PacketSessionPtyResize.java b/lib/src/main/java/com/trilead/ssh2/packets/PacketSessionPtyResize.java
index 27b5f00..1e3b558 100644
--- a/lib/src/main/java/com/trilead/ssh2/packets/PacketSessionPtyResize.java
+++ b/lib/src/main/java/com/trilead/ssh2/packets/PacketSessionPtyResize.java
@@ -4,15 +4,17 @@ public class PacketSessionPtyResize {
byte[] payload;
public int recipientChannelID;
- public boolean wantReply;
public int width;
public int height;
+ public int pixelWidth;
+ public int pixelHeight;
- public PacketSessionPtyResize(int recipientChannelID, boolean wantReply, int width, int height) {
+ public PacketSessionPtyResize(int recipientChannelID, int width, int height, int pixelWidth, int pixelHeight) {
this.recipientChannelID = recipientChannelID;
- this.wantReply = wantReply;
this.width = width;
this.height = height;
+ this.pixelWidth = pixelWidth;
+ this.pixelHeight = pixelHeight;
}
public byte[] getPayload()
@@ -23,11 +25,11 @@ public class PacketSessionPtyResize {
tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
tw.writeUINT32(recipientChannelID);
tw.writeString("window-change");
- tw.writeBoolean(wantReply);
+ tw.writeBoolean(false);
tw.writeUINT32(width);
tw.writeUINT32(height);
- tw.writeUINT32(0);
- tw.writeUINT32(0);
+ tw.writeUINT32(pixelWidth);
+ tw.writeUINT32(pixelHeight);
payload = tw.getBytes();
}