aboutsummaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c
index 8f4c9b22..ab47b96a 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -280,6 +280,9 @@ int ssh_socket_pollcallback(struct ssh_poll_handle_struct *p, socket_t fd, int r
}
}
if(r>0){
+ if (s->session->socket_counter != NULL) {
+ s->session->socket_counter->in_bytes += r;
+ }
/* Bufferize the data and then call the callback */
r = ssh_buffer_add_data(s->in_buffer,buffer,r);
if (r < 0) {
@@ -659,6 +662,9 @@ int ssh_socket_nonblocking_flush(ssh_socket s) {
return SSH_ERROR;
}
buffer_pass_bytes(s->out_buffer, w);
+ if (s->session->socket_counter != NULL) {
+ s->session->socket_counter->out_bytes += w;
+ }
}
/* Is there some data pending? */