diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/channels.c b/channels.c index e27ae1fa3..1937b0244 100644 --- a/channels.c +++ b/channels.c | |||
@@ -142,12 +142,12 @@ channel_lookup(int id) | |||
142 | Channel *c; | 142 | Channel *c; |
143 | 143 | ||
144 | if (id < 0 || id >= channels_alloc) { | 144 | if (id < 0 || id >= channels_alloc) { |
145 | logit("channel_lookup: %d: bad id", id); | 145 | log("channel_lookup: %d: bad id", id); |
146 | return NULL; | 146 | return NULL; |
147 | } | 147 | } |
148 | c = channels[id]; | 148 | c = channels[id]; |
149 | if (c == NULL) { | 149 | if (c == NULL) { |
150 | logit("channel_lookup: %d: bad id: channel free", id); | 150 | log("channel_lookup: %d: bad id: channel free", id); |
151 | return NULL; | 151 | return NULL; |
152 | } | 152 | } |
153 | return c; | 153 | return c; |
@@ -575,7 +575,7 @@ channel_send_open(int id) | |||
575 | Channel *c = channel_lookup(id); | 575 | Channel *c = channel_lookup(id); |
576 | 576 | ||
577 | if (c == NULL) { | 577 | if (c == NULL) { |
578 | logit("channel_send_open: %d: bad id", id); | 578 | log("channel_send_open: %d: bad id", id); |
579 | return; | 579 | return; |
580 | } | 580 | } |
581 | debug2("channel %d: send open", id); | 581 | debug2("channel %d: send open", id); |
@@ -593,7 +593,7 @@ channel_request_start(int id, char *service, int wantconfirm) | |||
593 | Channel *c = channel_lookup(id); | 593 | Channel *c = channel_lookup(id); |
594 | 594 | ||
595 | if (c == NULL) { | 595 | if (c == NULL) { |
596 | logit("channel_request_start: %d: unknown channel id", id); | 596 | log("channel_request_start: %d: unknown channel id", id); |
597 | return; | 597 | return; |
598 | } | 598 | } |
599 | debug("channel %d: request %s", id, service) ; | 599 | debug("channel %d: request %s", id, service) ; |
@@ -608,7 +608,7 @@ channel_register_confirm(int id, channel_callback_fn *fn) | |||
608 | Channel *c = channel_lookup(id); | 608 | Channel *c = channel_lookup(id); |
609 | 609 | ||
610 | if (c == NULL) { | 610 | if (c == NULL) { |
611 | logit("channel_register_comfirm: %d: bad id", id); | 611 | log("channel_register_comfirm: %d: bad id", id); |
612 | return; | 612 | return; |
613 | } | 613 | } |
614 | c->confirm = fn; | 614 | c->confirm = fn; |
@@ -619,7 +619,7 @@ channel_register_cleanup(int id, channel_callback_fn *fn) | |||
619 | Channel *c = channel_lookup(id); | 619 | Channel *c = channel_lookup(id); |
620 | 620 | ||
621 | if (c == NULL) { | 621 | if (c == NULL) { |
622 | logit("channel_register_cleanup: %d: bad id", id); | 622 | log("channel_register_cleanup: %d: bad id", id); |
623 | return; | 623 | return; |
624 | } | 624 | } |
625 | c->detach_user = fn; | 625 | c->detach_user = fn; |
@@ -630,7 +630,7 @@ channel_cancel_cleanup(int id) | |||
630 | Channel *c = channel_lookup(id); | 630 | Channel *c = channel_lookup(id); |
631 | 631 | ||
632 | if (c == NULL) { | 632 | if (c == NULL) { |
633 | logit("channel_cancel_cleanup: %d: bad id", id); | 633 | log("channel_cancel_cleanup: %d: bad id", id); |
634 | return; | 634 | return; |
635 | } | 635 | } |
636 | c->detach_user = NULL; | 636 | c->detach_user = NULL; |
@@ -641,7 +641,7 @@ channel_register_filter(int id, channel_filter_fn *fn) | |||
641 | Channel *c = channel_lookup(id); | 641 | Channel *c = channel_lookup(id); |
642 | 642 | ||
643 | if (c == NULL) { | 643 | if (c == NULL) { |
644 | logit("channel_register_filter: %d: bad id", id); | 644 | log("channel_register_filter: %d: bad id", id); |
645 | return; | 645 | return; |
646 | } | 646 | } |
647 | c->input_filter = fn; | 647 | c->input_filter = fn; |
@@ -833,7 +833,7 @@ channel_pre_x11_open_13(Channel *c, fd_set * readset, fd_set * writeset) | |||
833 | * We have received an X11 connection that has bad | 833 | * We have received an X11 connection that has bad |
834 | * authentication information. | 834 | * authentication information. |
835 | */ | 835 | */ |
836 | logit("X11 connection rejected because of wrong authentication."); | 836 | log("X11 connection rejected because of wrong authentication."); |
837 | buffer_clear(&c->input); | 837 | buffer_clear(&c->input); |
838 | buffer_clear(&c->output); | 838 | buffer_clear(&c->output); |
839 | channel_close_fd(&c->sock); | 839 | channel_close_fd(&c->sock); |
@@ -856,7 +856,7 @@ channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset) | |||
856 | c->type = SSH_CHANNEL_OPEN; | 856 | c->type = SSH_CHANNEL_OPEN; |
857 | channel_pre_open(c, readset, writeset); | 857 | channel_pre_open(c, readset, writeset); |
858 | } else if (ret == -1) { | 858 | } else if (ret == -1) { |
859 | logit("X11 connection rejected because of wrong authentication."); | 859 | log("X11 connection rejected because of wrong authentication."); |
860 | debug("X11 rejected %d i%d/o%d", c->self, c->istate, c->ostate); | 860 | debug("X11 rejected %d i%d/o%d", c->self, c->istate, c->ostate); |
861 | chan_read_failed(c); | 861 | chan_read_failed(c); |
862 | buffer_clear(&c->input); | 862 | buffer_clear(&c->input); |
@@ -1717,11 +1717,11 @@ channel_input_data(int type, u_int32_t seq, void *ctxt) | |||
1717 | 1717 | ||
1718 | if (compat20) { | 1718 | if (compat20) { |
1719 | if (data_len > c->local_maxpacket) { | 1719 | if (data_len > c->local_maxpacket) { |
1720 | logit("channel %d: rcvd big packet %d, maxpack %d", | 1720 | log("channel %d: rcvd big packet %d, maxpack %d", |
1721 | c->self, data_len, c->local_maxpacket); | 1721 | c->self, data_len, c->local_maxpacket); |
1722 | } | 1722 | } |
1723 | if (data_len > c->local_window) { | 1723 | if (data_len > c->local_window) { |
1724 | logit("channel %d: rcvd too much data %d, win %d", | 1724 | log("channel %d: rcvd too much data %d, win %d", |
1725 | c->self, data_len, c->local_window); | 1725 | c->self, data_len, c->local_window); |
1726 | xfree(data); | 1726 | xfree(data); |
1727 | return; | 1727 | return; |
@@ -1748,7 +1748,7 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt) | |||
1748 | if (c == NULL) | 1748 | if (c == NULL) |
1749 | packet_disconnect("Received extended_data for bad channel %d.", id); | 1749 | packet_disconnect("Received extended_data for bad channel %d.", id); |
1750 | if (c->type != SSH_CHANNEL_OPEN) { | 1750 | if (c->type != SSH_CHANNEL_OPEN) { |
1751 | logit("channel %d: ext data for non open", id); | 1751 | log("channel %d: ext data for non open", id); |
1752 | return; | 1752 | return; |
1753 | } | 1753 | } |
1754 | if (c->flags & CHAN_EOF_RCVD) { | 1754 | if (c->flags & CHAN_EOF_RCVD) { |
@@ -1762,13 +1762,13 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt) | |||
1762 | if (c->efd == -1 || | 1762 | if (c->efd == -1 || |
1763 | c->extended_usage != CHAN_EXTENDED_WRITE || | 1763 | c->extended_usage != CHAN_EXTENDED_WRITE || |
1764 | tcode != SSH2_EXTENDED_DATA_STDERR) { | 1764 | tcode != SSH2_EXTENDED_DATA_STDERR) { |
1765 | logit("channel %d: bad ext data", c->self); | 1765 | log("channel %d: bad ext data", c->self); |
1766 | return; | 1766 | return; |
1767 | } | 1767 | } |
1768 | data = packet_get_string(&data_len); | 1768 | data = packet_get_string(&data_len); |
1769 | packet_check_eom(); | 1769 | packet_check_eom(); |
1770 | if (data_len > c->local_window) { | 1770 | if (data_len > c->local_window) { |
1771 | logit("channel %d: rcvd too much extended_data %d, win %d", | 1771 | log("channel %d: rcvd too much extended_data %d, win %d", |
1772 | c->self, data_len, c->local_window); | 1772 | c->self, data_len, c->local_window); |
1773 | xfree(data); | 1773 | xfree(data); |
1774 | return; | 1774 | return; |
@@ -1934,7 +1934,7 @@ channel_input_open_failure(int type, u_int32_t seq, void *ctxt) | |||
1934 | msg = packet_get_string(NULL); | 1934 | msg = packet_get_string(NULL); |
1935 | lang = packet_get_string(NULL); | 1935 | lang = packet_get_string(NULL); |
1936 | } | 1936 | } |
1937 | logit("channel %d: open failed: %s%s%s", id, | 1937 | log("channel %d: open failed: %s%s%s", id, |
1938 | reason2txt(reason), msg ? ": ": "", msg ? msg : ""); | 1938 | reason2txt(reason), msg ? ": ": "", msg ? msg : ""); |
1939 | if (msg != NULL) | 1939 | if (msg != NULL) |
1940 | xfree(msg); | 1940 | xfree(msg); |
@@ -1961,7 +1961,7 @@ channel_input_window_adjust(int type, u_int32_t seq, void *ctxt) | |||
1961 | c = channel_lookup(id); | 1961 | c = channel_lookup(id); |
1962 | 1962 | ||
1963 | if (c == NULL || c->type != SSH_CHANNEL_OPEN) { | 1963 | if (c == NULL || c->type != SSH_CHANNEL_OPEN) { |
1964 | logit("Received window adjust for " | 1964 | log("Received window adjust for " |
1965 | "non-open channel %d.", id); | 1965 | "non-open channel %d.", id); |
1966 | return; | 1966 | return; |
1967 | } | 1967 | } |
@@ -2167,7 +2167,7 @@ channel_request_remote_forwarding(u_short listen_port, | |||
2167 | success = 1; | 2167 | success = 1; |
2168 | break; | 2168 | break; |
2169 | case SSH_SMSG_FAILURE: | 2169 | case SSH_SMSG_FAILURE: |
2170 | logit("Warning: Server denied remote port forwarding."); | 2170 | log("Warning: Server denied remote port forwarding."); |
2171 | break; | 2171 | break; |
2172 | default: | 2172 | default: |
2173 | /* Unknown packet */ | 2173 | /* Unknown packet */ |
@@ -2340,7 +2340,7 @@ channel_connect_to(const char *host, u_short port) | |||
2340 | 2340 | ||
2341 | } | 2341 | } |
2342 | if (!permit) { | 2342 | if (!permit) { |
2343 | logit("Received request to connect to host %.100s port %d, " | 2343 | log("Received request to connect to host %.100s port %d, " |
2344 | "but the request was denied.", host, port); | 2344 | "but the request was denied.", host, port); |
2345 | return -1; | 2345 | return -1; |
2346 | } | 2346 | } |