diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2017-05-23 20:43:22 +0300 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2017-05-23 20:43:22 +0300 |
| commit | c91852f897d74034f1810c142f00baabe9d60c1c (patch) | |
| tree | 2b1f3f08e64066fd044f0baf8982aec1eca837a1 /libguile-ssh | |
| parent | channel-type.c (print_channel): Add a check for Guile 2.2 (diff) | |
| download | guile-ssh-c91852f897d74034f1810c142f00baabe9d60c1c.tar.gz | |
channel-func.c (guile_ssh_channel_open_forward): Log warnings
* libguile-ssh/channel-func.c (guile_ssh_channel_open_forward): Log a warning
if a forwarding channel could not be open.
* tests/tunnel.scm ("port forwarding, direct, disconnected session"): New test
case.
Diffstat (limited to 'libguile-ssh')
| -rw-r--r-- | libguile-ssh/channel-func.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libguile-ssh/channel-func.c b/libguile-ssh/channel-func.c index 4e2980f..ea5715b 100644 --- a/libguile-ssh/channel-func.c +++ b/libguile-ssh/channel-func.c @@ -275,8 +275,15 @@ SCM_GSSH_DEFINE (guile_ssh_channel_open_forward, c_remote_host, scm_to_int32 (remote_port), c_source_host, scm_to_int32 (local_port)); - if (res == SSH_OK) + if (res == SSH_OK) { SCM_SET_CELL_TYPE (channel, SCM_CELL_TYPE (channel) | SCM_OPN); + } else { + _gssh_log_warning (FUNC_NAME, + "Could not open forwarding channel", + scm_list_n (channel, remote_host, + remote_port, source_host, + local_port, SCM_UNDEFINED)); + } scm_dynwind_end (); |
