comparison cli-chansession.c @ 1122:aaf576b27a10

Merge pull request #13 from gazoo74/fix-warnings Fix warnings
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 23:08:50 +0800
parents 6b6ed65e99b1
children 7373b304868d
comparison
equal deleted inserted replaced
1087:1e486f368ec3 1122:aaf576b27a10
54 cli_closechansess, /* closehandler */ 54 cli_closechansess, /* closehandler */
55 }; 55 };
56 56
57 static void cli_chansessreq(struct Channel *channel) { 57 static void cli_chansessreq(struct Channel *channel) {
58 58
59 unsigned char* type = NULL; 59 char* type = NULL;
60 int wantreply; 60 int wantreply;
61 61
62 TRACE(("enter cli_chansessreq")) 62 TRACE(("enter cli_chansessreq"))
63 63
64 type = buf_getstring(ses.payload, NULL); 64 type = buf_getstring(ses.payload, NULL);
270 cli_ses.winchange = 0; 270 cli_ses.winchange = 0;
271 } 271 }
272 272
273 static void send_chansess_pty_req(struct Channel *channel) { 273 static void send_chansess_pty_req(struct Channel *channel) {
274 274
275 unsigned char* term = NULL; 275 char* term = NULL;
276 276
277 TRACE(("enter send_chansess_pty_req")) 277 TRACE(("enter send_chansess_pty_req"))
278 278
279 start_send_channel_request(channel, "pty-req"); 279 start_send_channel_request(channel, "pty-req");
280 280
303 TRACE(("leave send_chansess_pty_req")) 303 TRACE(("leave send_chansess_pty_req"))
304 } 304 }
305 305
306 static void send_chansess_shell_req(struct Channel *channel) { 306 static void send_chansess_shell_req(struct Channel *channel) {
307 307
308 unsigned char* reqtype = NULL; 308 char* reqtype = NULL;
309 309
310 TRACE(("enter send_chansess_shell_req")) 310 TRACE(("enter send_chansess_shell_req"))
311 311
312 if (cli_opts.cmd) { 312 if (cli_opts.cmd) {
313 if (cli_opts.is_subsystem) { 313 if (cli_opts.is_subsystem) {
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, 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, source_host, strlen(source_host));