diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/channels.c b/channels.c index d343ac89e..d8c7e1243 100644 --- a/channels.c +++ b/channels.c | |||
@@ -704,7 +704,7 @@ channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset) | |||
704 | int err = 0; | 704 | int err = 0; |
705 | int sz = sizeof(err); | 705 | int sz = sizeof(err); |
706 | c->type = SSH_CHANNEL_OPEN; | 706 | c->type = SSH_CHANNEL_OPEN; |
707 | if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, &sz) < 0) { | 707 | if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, &sz) < 0) { |
708 | debug("getsockopt SO_ERROR failed"); | 708 | debug("getsockopt SO_ERROR failed"); |
709 | } else { | 709 | } else { |
710 | if (err == 0) { | 710 | if (err == 0) { |
@@ -1553,7 +1553,7 @@ channel_request_forwarding( | |||
1553 | 1553 | ||
1554 | if (remote_fwd) { | 1554 | if (remote_fwd) { |
1555 | host = listen_address; | 1555 | host = listen_address; |
1556 | ctype = SSH_CHANNEL_RPORT_LISTENER; | 1556 | ctype = SSH_CHANNEL_RPORT_LISTENER; |
1557 | } else { | 1557 | } else { |
1558 | host = host_to_connect; | 1558 | host = host_to_connect; |
1559 | ctype =SSH_CHANNEL_PORT_LISTENER; | 1559 | ctype =SSH_CHANNEL_PORT_LISTENER; |
@@ -1608,7 +1608,7 @@ channel_request_forwarding( | |||
1608 | error("bind: %.100s", strerror(errno)); | 1608 | error("bind: %.100s", strerror(errno)); |
1609 | else | 1609 | else |
1610 | verbose("bind: %.100s", strerror(errno)); | 1610 | verbose("bind: %.100s", strerror(errno)); |
1611 | 1611 | ||
1612 | close(sock); | 1612 | close(sock); |
1613 | continue; | 1613 | continue; |
1614 | } | 1614 | } |
@@ -1762,14 +1762,14 @@ channel_connect_to(const char *host, u_short host_port) | |||
1762 | error("connect %.100s port %s: %.100s", ntop, strport, | 1762 | error("connect %.100s port %s: %.100s", ntop, strport, |
1763 | strerror(errno)); | 1763 | strerror(errno)); |
1764 | close(sock); | 1764 | close(sock); |
1765 | continue; /* fail -- try next */ | 1765 | continue; /* fail -- try next */ |
1766 | } | 1766 | } |
1767 | break; /* success */ | 1767 | break; /* success */ |
1768 | 1768 | ||
1769 | } | 1769 | } |
1770 | freeaddrinfo(aitop); | 1770 | freeaddrinfo(aitop); |
1771 | if (!ai) { | 1771 | if (!ai) { |
1772 | error("connect %.100s port %d: failed.", host, host_port); | 1772 | error("connect %.100s port %d: failed.", host, host_port); |
1773 | return -1; | 1773 | return -1; |
1774 | } | 1774 | } |
1775 | /* success */ | 1775 | /* success */ |
@@ -1954,7 +1954,7 @@ x11_create_display_inet(int screen_number, int x11_display_offset) | |||
1954 | fatal("gethostname: %.100s", strerror(errno)); | 1954 | fatal("gethostname: %.100s", strerror(errno)); |
1955 | 1955 | ||
1956 | #ifdef IPADDR_IN_DISPLAY | 1956 | #ifdef IPADDR_IN_DISPLAY |
1957 | /* | 1957 | /* |
1958 | * HPUX detects the local hostname in the DISPLAY variable and tries | 1958 | * HPUX detects the local hostname in the DISPLAY variable and tries |
1959 | * to set up a shared memory connection to the server, which it | 1959 | * to set up a shared memory connection to the server, which it |
1960 | * incorrectly supposes to be local. | 1960 | * incorrectly supposes to be local. |
@@ -1983,7 +1983,7 @@ x11_create_display_inet(int screen_number, int x11_display_offset) | |||
1983 | memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr)); | 1983 | memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr)); |
1984 | 1984 | ||
1985 | /* Set DISPLAY to <ip address>:screen.display */ | 1985 | /* Set DISPLAY to <ip address>:screen.display */ |
1986 | snprintf(display, sizeof(display), "%.50s:%d.%d", inet_ntoa(my_addr), | 1986 | snprintf(display, sizeof(display), "%.50s:%d.%d", inet_ntoa(my_addr), |
1987 | display_number, screen_number); | 1987 | display_number, screen_number); |
1988 | } | 1988 | } |
1989 | #else /* IPADDR_IN_DISPLAY */ | 1989 | #else /* IPADDR_IN_DISPLAY */ |
@@ -2501,7 +2501,7 @@ channel_cancel_cleanup(int id) | |||
2501 | } | 2501 | } |
2502 | c->dettach_user = NULL; | 2502 | c->dettach_user = NULL; |
2503 | } | 2503 | } |
2504 | void | 2504 | void |
2505 | channel_register_filter(int id, channel_filter_fn *fn) | 2505 | channel_register_filter(int id, channel_filter_fn *fn) |
2506 | { | 2506 | { |
2507 | Channel *c = channel_lookup(id); | 2507 | Channel *c = channel_lookup(id); |