qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [27/50] [abbrv] qpid-proton git commit: PROTON-724: make sure to pop any pending output in pn_transport_close_head()
Date Fri, 14 Nov 2014 11:03:36 GMT
PROTON-724: make sure to pop any pending output in pn_transport_close_head()

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1633863 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/51625e52
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/51625e52
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/51625e52

Branch: refs/heads/examples
Commit: 51625e520d3b9b9cd89daa72e60fe3117df2c69b
Parents: 2b674b2
Author: Rafael H. Schloming <rhs@apache.org>
Authored: Thu Oct 23 16:08:49 2014 +0000
Committer: Rafael H. Schloming <rhs@apache.org>
Committed: Thu Oct 23 16:08:49 2014 +0000

----------------------------------------------------------------------
 proton-c/src/transport/transport.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/51625e52/proton-c/src/transport/transport.c
----------------------------------------------------------------------
diff --git a/proton-c/src/transport/transport.c b/proton-c/src/transport/transport.c
index b92696b..4b85c54 100644
--- a/proton-c/src/transport/transport.c
+++ b/proton-c/src/transport/transport.c
@@ -2173,7 +2173,7 @@ ssize_t pn_transport_peek(pn_transport_t *transport, char *dst, size_t
size)
 
 void pn_transport_pop(pn_transport_t *transport, size_t size)
 {
-  if (transport && size) {
+  if (transport) {
     assert( transport->output_pending >= size );
     transport->output_pending -= size;
     transport->bytes_output += size;
@@ -2194,7 +2194,9 @@ void pn_transport_pop(pn_transport_t *transport, size_t size)
 
 int pn_transport_close_head(pn_transport_t *transport)
 {
+  size_t pending = pn_transport_pending(transport);
   transport->head_closed = true;
+  pn_transport_pop(transport, pending);
   return 0;
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message