comparison cli-chansession.c @ 1094:c45d65392c1a

Fix pointer differ in signess warnings [-Werror=pointer-sign]
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 15:59:06 +0200
parents 0bb16232e7c4
children 93e29b0ef8dc
comparison
equal deleted inserted replaced
1093:aae71c5f7d5b 1094:c45d65392c1a
259 channel = ses.channels[i]; 259 channel = ses.channels[i];
260 if (channel != NULL && channel->type == &clichansess) { 260 if (channel != NULL && channel->type == &clichansess) {
261 CHECKCLEARTOWRITE(); 261 CHECKCLEARTOWRITE();
262 buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_REQUEST); 262 buf_putbyte(ses.writepayload, SSH_MSG_CHANNEL_REQUEST);
263 buf_putint(ses.writepayload, channel->remotechan); 263 buf_putint(ses.writepayload, channel->remotechan);
264 buf_putstring(ses.writepayload, "window-change", 13); 264 buf_putstring(ses.writepayload, (const unsigned char *) "window-change", 13);
265 buf_putbyte(ses.writepayload, 0); /* FALSE says the spec */ 265 buf_putbyte(ses.writepayload, 0); /* FALSE says the spec */
266 put_winsize(); 266 put_winsize();
267 encrypt_packet(); 267 encrypt_packet();
268 } 268 }
269 } 269 }
322 start_send_channel_request(channel, reqtype); 322 start_send_channel_request(channel, reqtype);
323 323
324 /* XXX TODO */ 324 /* XXX TODO */
325 buf_putbyte(ses.writepayload, 0); /* Don't want replies */ 325 buf_putbyte(ses.writepayload, 0); /* Don't want replies */
326 if (cli_opts.cmd) { 326 if (cli_opts.cmd) {
327 buf_putstring(ses.writepayload, cli_opts.cmd, strlen(cli_opts.cmd)); 327 buf_putstring(ses.writepayload, (const unsigned char *)cli_opts.cmd, strlen(cli_opts.cmd));
328 } 328 }
329 329
330 encrypt_packet(); 330 encrypt_packet();
331 TRACE(("leave send_chansess_shell_req")) 331 TRACE(("leave send_chansess_shell_req"))
332 } 332 }
390 cli_closechansess 390 cli_closechansess
391 }; 391 };
392 392
393 void cli_send_netcat_request() { 393 void cli_send_netcat_request() {
394 394
395 const unsigned char* source_host = "127.0.0.1"; 395 const char* source_host = "127.0.0.1";
396 const int source_port = 22; 396 const int source_port = 22;
397 397
398 TRACE(("enter cli_send_netcat_request")) 398 TRACE(("enter cli_send_netcat_request"))
399 cli_opts.wantpty = 0; 399 cli_opts.wantpty = 0;
400 400
401 if (send_msg_channel_open_init(STDIN_FILENO, &cli_chan_netcat) 401 if (send_msg_channel_open_init(STDIN_FILENO, &cli_chan_netcat)
402 == DROPBEAR_FAILURE) { 402 == DROPBEAR_FAILURE) {
403 dropbear_exit("Couldn't open initial channel"); 403 dropbear_exit("Couldn't open initial channel");
404 } 404 }
405 405
406 buf_putstring(ses.writepayload, cli_opts.netcat_host, 406 buf_putstring(ses.writepayload, (const unsigned char *)cli_opts.netcat_host,
407 strlen(cli_opts.netcat_host)); 407 strlen(cli_opts.netcat_host));
408 buf_putint(ses.writepayload, cli_opts.netcat_port); 408 buf_putint(ses.writepayload, cli_opts.netcat_port);
409 409
410 /* originator ip - localhost is accurate enough */ 410 /* originator ip - localhost is accurate enough */
411 buf_putstring(ses.writepayload, source_host, strlen(source_host)); 411 buf_putstring(ses.writepayload, (const unsigned char *)source_host, strlen(source_host));
412 buf_putint(ses.writepayload, source_port); 412 buf_putint(ses.writepayload, source_port);
413 413
414 encrypt_packet(); 414 encrypt_packet();
415 TRACE(("leave cli_send_netcat_request")) 415 TRACE(("leave cli_send_netcat_request"))
416 } 416 }