qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject qpid-proton git commit: emit a transport event when the remote timeout is updated
Date Thu, 29 Jan 2015 13:38:10 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 0faf71f16 -> 0a2cdb980


emit a transport event when the remote timeout is updated


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

Branch: refs/heads/master
Commit: 0a2cdb9802c3c6e9784ca391a7a5b814c01f2d59
Parents: 0faf71f
Author: Rafael Schloming <rhs@alum.mit.edu>
Authored: Thu Jan 29 08:37:58 2015 -0500
Committer: Rafael Schloming <rhs@alum.mit.edu>
Committed: Thu Jan 29 08:37:58 2015 -0500

----------------------------------------------------------------------
 proton-c/src/transport/transport.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0a2cdb98/proton-c/src/transport/transport.c
----------------------------------------------------------------------
diff --git a/proton-c/src/transport/transport.c b/proton-c/src/transport/transport.c
index 84ae566..c75efe2 100644
--- a/proton-c/src/transport/transport.c
+++ b/proton-c/src/transport/transport.c
@@ -482,6 +482,13 @@ static void pn_transport_finalize(void *object)
   free(transport->output);
 }
 
+static void pni_post_remote_open_events(pn_transport_t *transport, pn_connection_t *connection)
{
+    pn_collector_put(connection->collector, PN_OBJECT, connection, PN_CONNECTION_REMOTE_OPEN);
+    if (transport->remote_idle_timeout) {
+      pn_collector_put(connection->collector, PN_OBJECT, transport, PN_TRANSPORT);
+    }
+}
+
 int pn_transport_bind(pn_transport_t *transport, pn_connection_t *connection)
 {
   assert(transport);
@@ -499,7 +506,7 @@ int pn_transport_bind(pn_transport_t *transport, pn_connection_t *connection)
 
   if (transport->open_rcvd) {
     PN_SET_REMOTE(connection->endpoint.state, PN_REMOTE_ACTIVE);
-    pn_collector_put(connection->collector, PN_OBJECT, connection, PN_CONNECTION_REMOTE_OPEN);
+    pni_post_remote_open_events(transport, connection);
     transport->halt = false;
     transport_consume(transport);        // blech - testBindAfterOpen
   }
@@ -949,7 +956,7 @@ int pn_do_open(pn_transport_t *transport, uint8_t frame_type, uint16_t
channel,
 
   if (conn) {
     PN_SET_REMOTE(conn->endpoint.state, PN_REMOTE_ACTIVE);
-    pn_collector_put(conn->collector, PN_OBJECT, conn, PN_CONNECTION_REMOTE_OPEN);
+    pni_post_remote_open_events(transport, conn);
   } else {
     transport->halt = true;
   }


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


Mime
View raw message