# HG changeset patch # User Gaƫl PORTAY # Date 1430571417 -7200 # Node ID f95b6e87cd0cfb4ab2cad7f4f78687e92cffad97 # Parent 93e29b0ef8dcde1c7190870fe5019fc472b0d270 Turn send_msg_channel_open_failure()'s text and lang into const char * diff -r 93e29b0ef8dc -r f95b6e87cd0c common-channel.c --- a/common-channel.c Sat May 02 13:58:05 2015 +0200 +++ b/common-channel.c Sat May 02 14:56:57 2015 +0200 @@ -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); @@ -1039,7 +1039,7 @@ /* 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 @@ 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"))