Mercurial > dropbear
comparison tcp-accept.c @ 1120:391bb7d560c6
Merge branch 'fix-pointer-sign-warnings' into fix-warnings
author | Gaël PORTAY <gael.portay@gmail.com> |
---|---|
date | Tue, 05 May 2015 20:42:38 +0200 |
parents | 2c646a65a1e3 |
children | d7b752525b91 |
comparison
equal
deleted
inserted
replaced
1093:aae71c5f7d5b | 1120:391bb7d560c6 |
---|---|
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, ipstring, strlen(ipstring)); | 101 buf_putstring(ses.writepayload, (const unsigned char *)ipstring, strlen(ipstring)); |
102 /* originator port */ | 102 /* originator port */ |
103 buf_putint(ses.writepayload, atol(portstring)); | 103 buf_putint(ses.writepayload, atol(portstring)); |
104 | 104 |
105 encrypt_packet(); | 105 encrypt_packet(); |
106 | 106 |