aboutsummaryrefslogtreecommitdiff
path: root/ssh
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-10-03 21:30:00 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-10-03 21:30:00 +0200
commit856ae316cb369956917a8dcdbeb4d662522c5f7f (patch)
treedc781a74eed6d1d103d3c4a9a8354311adbfef41 /ssh
parentf831be5129c9d76b32adc375c7532bf87eacef16 (diff)
ssh/server_proxy: More debug data about backend->client passing
Diffstat (limited to 'ssh')
-rw-r--r--ssh/server_proxy.c7
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);
}
}