diff options
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/clientloop.c b/clientloop.c index 3b9700aa4..672d06989 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clientloop.c,v 1.263 2015/01/19 19:52:16 markus Exp $ */ | 1 | /* $OpenBSD: clientloop.c,v 1.264 2015/01/19 20:07:45 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -536,13 +536,13 @@ client_check_window_change(void) | |||
536 | } | 536 | } |
537 | } | 537 | } |
538 | 538 | ||
539 | static void | 539 | static int |
540 | client_global_request_reply(int type, u_int32_t seq, void *ctxt) | 540 | client_global_request_reply(int type, u_int32_t seq, void *ctxt) |
541 | { | 541 | { |
542 | struct global_confirm *gc; | 542 | struct global_confirm *gc; |
543 | 543 | ||
544 | if ((gc = TAILQ_FIRST(&global_confirms)) == NULL) | 544 | if ((gc = TAILQ_FIRST(&global_confirms)) == NULL) |
545 | return; | 545 | return 0; |
546 | if (gc->cb != NULL) | 546 | if (gc->cb != NULL) |
547 | gc->cb(type, seq, gc->ctx); | 547 | gc->cb(type, seq, gc->ctx); |
548 | if (--gc->ref_count <= 0) { | 548 | if (--gc->ref_count <= 0) { |
@@ -552,6 +552,7 @@ client_global_request_reply(int type, u_int32_t seq, void *ctxt) | |||
552 | } | 552 | } |
553 | 553 | ||
554 | packet_set_alive_timeouts(0); | 554 | packet_set_alive_timeouts(0); |
555 | return 0; | ||
555 | } | 556 | } |
556 | 557 | ||
557 | static void | 558 | static void |
@@ -1739,7 +1740,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id) | |||
1739 | 1740 | ||
1740 | /*********/ | 1741 | /*********/ |
1741 | 1742 | ||
1742 | static void | 1743 | static int |
1743 | client_input_stdout_data(int type, u_int32_t seq, void *ctxt) | 1744 | client_input_stdout_data(int type, u_int32_t seq, void *ctxt) |
1744 | { | 1745 | { |
1745 | u_int data_len; | 1746 | u_int data_len; |
@@ -1748,8 +1749,9 @@ client_input_stdout_data(int type, u_int32_t seq, void *ctxt) | |||
1748 | buffer_append(&stdout_buffer, data, data_len); | 1749 | buffer_append(&stdout_buffer, data, data_len); |
1749 | explicit_bzero(data, data_len); | 1750 | explicit_bzero(data, data_len); |
1750 | free(data); | 1751 | free(data); |
1752 | return 0; | ||
1751 | } | 1753 | } |
1752 | static void | 1754 | static int |
1753 | client_input_stderr_data(int type, u_int32_t seq, void *ctxt) | 1755 | client_input_stderr_data(int type, u_int32_t seq, void *ctxt) |
1754 | { | 1756 | { |
1755 | u_int data_len; | 1757 | u_int data_len; |
@@ -1758,8 +1760,9 @@ client_input_stderr_data(int type, u_int32_t seq, void *ctxt) | |||
1758 | buffer_append(&stderr_buffer, data, data_len); | 1760 | buffer_append(&stderr_buffer, data, data_len); |
1759 | explicit_bzero(data, data_len); | 1761 | explicit_bzero(data, data_len); |
1760 | free(data); | 1762 | free(data); |
1763 | return 0; | ||
1761 | } | 1764 | } |
1762 | static void | 1765 | static int |
1763 | client_input_exit_status(int type, u_int32_t seq, void *ctxt) | 1766 | client_input_exit_status(int type, u_int32_t seq, void *ctxt) |
1764 | { | 1767 | { |
1765 | exit_status = packet_get_int(); | 1768 | exit_status = packet_get_int(); |
@@ -1774,8 +1777,9 @@ client_input_exit_status(int type, u_int32_t seq, void *ctxt) | |||
1774 | packet_write_wait(); | 1777 | packet_write_wait(); |
1775 | /* Flag that we want to exit. */ | 1778 | /* Flag that we want to exit. */ |
1776 | quit_pending = 1; | 1779 | quit_pending = 1; |
1780 | return 0; | ||
1777 | } | 1781 | } |
1778 | static void | 1782 | static int |
1779 | client_input_agent_open(int type, u_int32_t seq, void *ctxt) | 1783 | client_input_agent_open(int type, u_int32_t seq, void *ctxt) |
1780 | { | 1784 | { |
1781 | Channel *c = NULL; | 1785 | Channel *c = NULL; |
@@ -1818,6 +1822,7 @@ client_input_agent_open(int type, u_int32_t seq, void *ctxt) | |||
1818 | packet_put_int(c->self); | 1822 | packet_put_int(c->self); |
1819 | } | 1823 | } |
1820 | packet_send(); | 1824 | packet_send(); |
1825 | return 0; | ||
1821 | } | 1826 | } |
1822 | 1827 | ||
1823 | static Channel * | 1828 | static Channel * |
@@ -1978,7 +1983,7 @@ client_request_tun_fwd(int tun_mode, int local_tun, int remote_tun) | |||
1978 | } | 1983 | } |
1979 | 1984 | ||
1980 | /* XXXX move to generic input handler */ | 1985 | /* XXXX move to generic input handler */ |
1981 | static void | 1986 | static int |
1982 | client_input_channel_open(int type, u_int32_t seq, void *ctxt) | 1987 | client_input_channel_open(int type, u_int32_t seq, void *ctxt) |
1983 | { | 1988 | { |
1984 | Channel *c = NULL; | 1989 | Channel *c = NULL; |
@@ -2029,8 +2034,9 @@ client_input_channel_open(int type, u_int32_t seq, void *ctxt) | |||
2029 | packet_send(); | 2034 | packet_send(); |
2030 | } | 2035 | } |
2031 | free(ctype); | 2036 | free(ctype); |
2037 | return 0; | ||
2032 | } | 2038 | } |
2033 | static void | 2039 | static int |
2034 | client_input_channel_req(int type, u_int32_t seq, void *ctxt) | 2040 | client_input_channel_req(int type, u_int32_t seq, void *ctxt) |
2035 | { | 2041 | { |
2036 | Channel *c = NULL; | 2042 | Channel *c = NULL; |
@@ -2075,8 +2081,9 @@ client_input_channel_req(int type, u_int32_t seq, void *ctxt) | |||
2075 | packet_send(); | 2081 | packet_send(); |
2076 | } | 2082 | } |
2077 | free(rtype); | 2083 | free(rtype); |
2084 | return 0; | ||
2078 | } | 2085 | } |
2079 | static void | 2086 | static int |
2080 | client_input_global_request(int type, u_int32_t seq, void *ctxt) | 2087 | client_input_global_request(int type, u_int32_t seq, void *ctxt) |
2081 | { | 2088 | { |
2082 | char *rtype; | 2089 | char *rtype; |
@@ -2094,6 +2101,7 @@ client_input_global_request(int type, u_int32_t seq, void *ctxt) | |||
2094 | packet_write_wait(); | 2101 | packet_write_wait(); |
2095 | } | 2102 | } |
2096 | free(rtype); | 2103 | free(rtype); |
2104 | return 0; | ||
2097 | } | 2105 | } |
2098 | 2106 | ||
2099 | void | 2107 | void |