comparison tcp-accept.c @ 1109:2c646a65a1e3

Turn addr local variable into char *
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 23:03:27 +0200
parents c45d65392c1a
children d7b752525b91
comparison
equal deleted inserted replaced
1108:2ebf450edc2d 1109:2c646a65a1e3
73 m_close(fd); 73 m_close(fd);
74 return; 74 return;
75 } 75 }
76 76
77 if (send_msg_channel_open_init(fd, tcpinfo->chantype) == DROPBEAR_SUCCESS) { 77 if (send_msg_channel_open_init(fd, tcpinfo->chantype) == DROPBEAR_SUCCESS) {
78 unsigned char* addr = NULL; 78 char* addr = NULL;
79 unsigned int port = 0; 79 unsigned int port = 0;
80 80
81 if (tcpinfo->tcp_type == direct) { 81 if (tcpinfo->tcp_type == direct) {
82 /* "direct-tcpip" */ 82 /* "direct-tcpip" */
83 /* host to connect, port to connect */ 83 /* host to connect, port to connect */
92 } 92 }
93 93
94 if (addr == NULL) { 94 if (addr == NULL) {
95 addr = "localhost"; 95 addr = "localhost";
96 } 96 }
97 buf_putstring(ses.writepayload, addr, strlen(addr)); 97 buf_putstring(ses.writepayload, (const unsigned char *)addr, strlen(addr));
98 buf_putint(ses.writepayload, port); 98 buf_putint(ses.writepayload, port);
99 99
100 /* originator ip */ 100 /* originator ip */
101 buf_putstring(ses.writepayload, (const unsigned char *)ipstring, strlen(ipstring)); 101 buf_putstring(ses.writepayload, (const unsigned char *)ipstring, strlen(ipstring));
102 /* originator port */ 102 /* originator port */