diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-06-04 23:08:50 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-06-04 23:08:50 +0800 |
commit | 1a4db21fe4e06f4a5e5b74e35027091370b54abb (patch) | |
tree | 7543bf0e7a5d133c5564dd0ddcf35685bc308a98 /common-channel.c | |
parent | e7ac4c1ab3eee827d781ececf6c7342c432b91d3 (diff) |
buf_getstring and buf_putstring now use non-unsigned char*
Diffstat (limited to 'common-channel.c')
-rw-r--r-- | common-channel.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common-channel.c b/common-channel.c index a4fd787..abe5941 100644 --- a/common-channel.c +++ b/common-channel.c @@ -934,7 +934,7 @@ void recv_msg_channel_open() { TRACE(("enter recv_msg_channel_open")) /* get the packet contents */ - type = (char *) buf_getstring(ses.payload, &typelen); + type = buf_getstring(ses.payload, &typelen); remotechan = buf_getint(ses.payload); transwindow = buf_getint(ses.payload); @@ -1047,8 +1047,8 @@ static void send_msg_channel_open_failure(unsigned int remotechan, buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_OPEN_FAILURE); buf_putint(ses.writepayload, remotechan); buf_putint(ses.writepayload, reason); - buf_putstring(ses.writepayload, (const unsigned char *) text, strlen(text)); - buf_putstring(ses.writepayload, (const unsigned char *) lang, strlen(lang)); + buf_putstring(ses.writepayload, text, strlen(text)); + buf_putstring(ses.writepayload, lang, strlen(lang)); encrypt_packet(); TRACE(("leave send_msg_channel_open_failure")) @@ -1149,7 +1149,7 @@ int send_msg_channel_open_init(int fd, const struct ChanType *type) { CHECKCLEARTOWRITE(); buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_OPEN); - buf_putstring(ses.writepayload, (const unsigned char *) type->name, strlen(type->name)); + buf_putstring(ses.writepayload, type->name, strlen(type->name)); buf_putint(ses.writepayload, chan->index); buf_putint(ses.writepayload, opts.recv_window); buf_putint(ses.writepayload, RECV_MAX_CHANNEL_DATA_LEN); @@ -1250,6 +1250,6 @@ void start_send_channel_request(struct Channel *channel, buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_REQUEST); buf_putint(ses.writepayload, channel->remotechan); - buf_putstring(ses.writepayload, (const unsigned char *) type, strlen(type)); + buf_putstring(ses.writepayload, type, strlen(type)); } |