socket: Pass port as uint16_t to ssh_socket_connect()
Fixes T188 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Этот коммит содержится в:
родитель
64155b4f97
Коммит
d60640cd0e
@ -63,6 +63,9 @@ void ssh_socket_set_callbacks(ssh_socket s, ssh_socket_callbacks callbacks);
|
||||
int ssh_socket_pollcallback(struct ssh_poll_handle_struct *p, socket_t fd, int revents, void *v_s);
|
||||
struct ssh_poll_handle_struct * ssh_socket_get_poll_handle(ssh_socket s);
|
||||
|
||||
int ssh_socket_connect(ssh_socket s, const char *host, int port, const char *bind_addr);
|
||||
int ssh_socket_connect(ssh_socket s,
|
||||
const char *host,
|
||||
uint16_t port,
|
||||
const char *bind_addr);
|
||||
|
||||
#endif /* SOCKET_H_ */
|
||||
|
@ -806,9 +806,10 @@ int ssh_socket_set_blocking(socket_t fd)
|
||||
* @bug It only tries connecting to one of the available AI's
|
||||
* which is problematic for hosts having DNS fail-over.
|
||||
*/
|
||||
|
||||
int
|
||||
ssh_socket_connect(ssh_socket s, const char *host, int port, const char *bind_addr)
|
||||
int ssh_socket_connect(ssh_socket s,
|
||||
const char *host,
|
||||
uint16_t port,
|
||||
const char *bind_addr)
|
||||
{
|
||||
socket_t fd;
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user