diff options
Diffstat (limited to 'ssh')
-rw-r--r-- | ssh/server_proxy.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ssh/server_proxy.c b/ssh/server_proxy.c index 84f0587..98a87bc 100644 --- a/ssh/server_proxy.c +++ b/ssh/server_proxy.c @@ -209,7 +209,10 @@ static int backend_data_cb(int fd, int revents, void *tdata_) { return 0; } - int cursor = 0; + debug("[%d] data from backend (length %zu):\n", tdata->thread_id, nr); + if (debug_enabled) xxd(stdout, buffer, nr); + + ssize_t cursor = 0; while (cursor < nr) { int nw = ssh_channel_write(tdata->channel, buffer + cursor, nr - cursor); if (nw == SSH_ERROR) { @@ -218,6 +221,8 @@ static int backend_data_cb(int fd, int revents, void *tdata_) { return 0; } cursor += nw; + debug("[%d] forwarded %d bytes, total %zd/%zd\n", + tdata->thread_id, nw, cursor, nr); } } |