You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2014/10/23 18:08:50 UTC

svn commit: r1633863 - /qpid/proton/trunk/proton-c/src/transport/transport.c

Author: rhs
Date: Thu Oct 23 16:08:49 2014
New Revision: 1633863

URL: http://svn.apache.org/r1633863
Log:
PROTON-724: make sure to pop any pending output in pn_transport_close_head()

Modified:
    qpid/proton/trunk/proton-c/src/transport/transport.c

Modified: qpid/proton/trunk/proton-c/src/transport/transport.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/transport/transport.c?rev=1633863&r1=1633862&r2=1633863&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/transport/transport.c (original)
+++ qpid/proton/trunk/proton-c/src/transport/transport.c Thu Oct 23 16:08:49 2014
@@ -2173,7 +2173,7 @@ ssize_t pn_transport_peek(pn_transport_t
 
 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 *tr
 
 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