summaryrefslogtreecommitdiffhomepage
path: root/common-channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'common-channel.c')
-rw-r--r--common-channel.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/common-channel.c b/common-channel.c
index 5f4051e..a4fd787 100644
--- a/common-channel.c
+++ b/common-channel.c
@@ -38,7 +38,7 @@
#include "netio.h"
static void send_msg_channel_open_failure(unsigned int remotechan, int reason,
- const unsigned char *text, const unsigned char *lang);
+ const char *text, const char *lang);
static void send_msg_channel_open_confirmation(struct Channel* channel,
unsigned int recvwindow,
unsigned int recvmaxpacket);
@@ -921,7 +921,7 @@ static void send_msg_channel_window_adjust(struct Channel* channel,
/* Handle a new channel request, performing any channel-type-specific setup */
void recv_msg_channel_open() {
- unsigned char *type;
+ char *type;
unsigned int typelen;
unsigned int remotechan, transwindow, transmaxpacket;
struct Channel *channel;
@@ -934,7 +934,7 @@ void recv_msg_channel_open() {
TRACE(("enter recv_msg_channel_open"))
/* get the packet contents */
- type = buf_getstring(ses.payload, &typelen);
+ type = (char *) buf_getstring(ses.payload, &typelen);
remotechan = buf_getint(ses.payload);
transwindow = buf_getint(ses.payload);
@@ -1039,7 +1039,7 @@ void send_msg_channel_success(struct Channel *channel) {
/* Send a channel open failure message, with a corresponding reason
* code (usually resource shortage or unknown chan type) */
static void send_msg_channel_open_failure(unsigned int remotechan,
- int reason, const unsigned char *text, const unsigned char *lang) {
+ int reason, const char *text, const char *lang) {
TRACE(("enter send_msg_channel_open_failure"))
CHECKCLEARTOWRITE();
@@ -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, text, strlen((char*)text));
- buf_putstring(ses.writepayload, lang, strlen((char*)lang));
+ buf_putstring(ses.writepayload, (const unsigned char *) text, strlen(text));
+ buf_putstring(ses.writepayload, (const unsigned char *) 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, type->name, strlen(type->name));
+ buf_putstring(ses.writepayload, (const unsigned char *) 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);
@@ -1244,12 +1244,12 @@ struct Channel* get_any_ready_channel() {
}
void start_send_channel_request(struct Channel *channel,
- unsigned char *type) {
+ char *type) {
CHECKCLEARTOWRITE();
buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_REQUEST);
buf_putint(ses.writepayload, channel->remotechan);
- buf_putstring(ses.writepayload, type, strlen(type));
+ buf_putstring(ses.writepayload, (const unsigned char *) type, strlen(type));
}