You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2020/11/03 19:22:47 UTC
[qpid-dispatch] branch dev-protocol-adaptors-2 updated:
DISPATCH-1806: Account properly for write buffer byte count
This is an automated email from the ASF dual-hosted git repository.
chug pushed a commit to branch dev-protocol-adaptors-2
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/dev-protocol-adaptors-2 by this push:
new 95c3d93 DISPATCH-1806: Account properly for write buffer byte count
95c3d93 is described below
commit 95c3d936f7d6d90fd3760f4cc450f8ca5a4b805a
Author: Chuck Rolke <ch...@apache.org>
AuthorDate: Tue Nov 3 14:19:39 2020 -0500
DISPATCH-1806: Account properly for write buffer byte count
Use proper indexes to get written buffer sizes.
---
src/adaptors/tcp_adaptor.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/adaptors/tcp_adaptor.c b/src/adaptors/tcp_adaptor.c
index c91a855..ee3c436 100644
--- a/src/adaptors/tcp_adaptor.c
+++ b/src/adaptors/tcp_adaptor.c
@@ -305,8 +305,6 @@ static bool write_outgoing_buffs(qdr_tcp_connection_t *conn)
&conn->outgoing_buffs[conn->outgoing_buff_idx],
conn->outgoing_buff_count);
result = used == conn->outgoing_buff_count;
- conn->outgoing_buff_count -= used;
- conn->outgoing_buff_idx += used;
int bytes_written = 0;
for (size_t i = 0; i < used; i++) {
@@ -319,6 +317,9 @@ static bool write_outgoing_buffs(qdr_tcp_connection_t *conn)
}
qd_log(tcp_adaptor->log_source, QD_LOG_DEBUG,
"[C%"PRIu64"] Writing %i bytes", conn->conn_id, bytes_written);
+
+ conn->outgoing_buff_count -= used;
+ conn->outgoing_buff_idx += used;
}
return result;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org