comparison cli-tcpfwd.c @ 1121:bb3a03feb31f

Merge pull request #13 from gazoo74/fix-warnings Fix warnings
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 22:25:28 +0800
parents c45d65392c1a
children d7b752525b91
comparison
equal deleted inserted replaced
1087:1e486f368ec3 1121:bb3a03feb31f
134 134
135 TRACE(("enter send_msg_global_request_remotetcp")) 135 TRACE(("enter send_msg_global_request_remotetcp"))
136 136
137 CHECKCLEARTOWRITE(); 137 CHECKCLEARTOWRITE();
138 buf_putbyte(ses.writepayload, SSH_MSG_GLOBAL_REQUEST); 138 buf_putbyte(ses.writepayload, SSH_MSG_GLOBAL_REQUEST);
139 buf_putstring(ses.writepayload, "tcpip-forward", 13); 139 buf_putstring(ses.writepayload, (const unsigned char *)"tcpip-forward", 13);
140 buf_putbyte(ses.writepayload, 1); /* want_reply */ 140 buf_putbyte(ses.writepayload, 1); /* want_reply */
141 buf_putstring(ses.writepayload, addr, strlen(addr)); 141 buf_putstring(ses.writepayload, (const unsigned char *)addr, strlen(addr));
142 buf_putint(ses.writepayload, port); 142 buf_putint(ses.writepayload, port);
143 143
144 encrypt_packet(); 144 encrypt_packet();
145 145
146 TRACE(("leave send_msg_global_request_remotetcp")) 146 TRACE(("leave send_msg_global_request_remotetcp"))
216 m_list_elem * iter = NULL; 216 m_list_elem * iter = NULL;
217 struct TCPFwdEntry *fwd; 217 struct TCPFwdEntry *fwd;
218 char portstring[NI_MAXSERV]; 218 char portstring[NI_MAXSERV];
219 int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; 219 int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
220 220
221 origaddr = buf_getstring(ses.payload, NULL); 221 origaddr = (char *)buf_getstring(ses.payload, NULL);
222 origport = buf_getint(ses.payload); 222 origport = buf_getint(ses.payload);
223 223
224 /* Find which port corresponds. First try and match address as well as port, 224 /* Find which port corresponds. First try and match address as well as port,
225 in case they want to forward different ports separately ... */ 225 in case they want to forward different ports separately ... */
226 for (iter = cli_opts.remotefwds->first; iter; iter = iter->next) { 226 for (iter = cli_opts.remotefwds->first; iter; iter = iter->next) {