mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user