diff options
author | Audrius Butkevicius <audrius.butkevicius@elastichosts.com> | 2014-02-12 16:53:18 +0000 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2014-02-12 18:21:16 +0100 |
commit | a277dd92776c5c18d4e08a555e169c46cf75ff94 (patch) | |
tree | 5873ed8615e8b0d52ac83337cd4b14d528276d34 /src/channels1.c | |
parent | 370d4b014d22d6ae9229498f75a4f6d28d0d1614 (diff) | |
download | libssh-a277dd92776c5c18d4e08a555e169c46cf75ff94.tar.gz libssh-a277dd92776c5c18d4e08a555e169c46cf75ff94.tar.xz libssh-a277dd92776c5c18d4e08a555e169c46cf75ff94.zip |
Add session/channel byte/packet counters
Signed-off-by: Audrius Butkevicius <audrius.butkevicius@elastichosts.com>
Diffstat (limited to 'src/channels1.c')
-rw-r--r-- | src/channels1.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/channels1.c b/src/channels1.c index 2b307408..4d82c636 100644 --- a/src/channels1.c +++ b/src/channels1.c @@ -367,6 +367,9 @@ int channel_write1(ssh_channel channel, const void *data, int len) { return -1; } ssh_handle_packets(session, SSH_TIMEOUT_NONBLOCKING); + if (channel->counter != NULL) { + channel->counter->out_bytes += effectivelen; + } } if (ssh_blocking_flush(session,SSH_TIMEOUT_USER) == SSH_ERROR) return -1; |