You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2019/09/19 17:10:42 UTC

[GitHub] [qpid-dispatch] kgiusti commented on a change in pull request #567: DISPATCH-1428

kgiusti commented on a change in pull request #567: DISPATCH-1428
URL: https://github.com/apache/qpid-dispatch/pull/567#discussion_r326286986
 
 

 ##########
 File path: src/router_core/route_control.c
 ##########
 @@ -625,9 +595,65 @@ void qdr_route_connection_closed_CT(qdr_core_t *core, qdr_connection_t *conn)
         //
         qdr_del_connection_ref(&cid->connection_refs, conn);
 
-        conn->conn_id        = 0;
-
         qdr_route_check_id_for_deletion_CT(core, cid);
+}
+
+void qdr_route_connection_opened_CT(qdr_core_t       *core,
+                                    qdr_connection_t *conn,
+                                    qdr_field_t      *container_field,
+                                    qdr_field_t      *connection_field)
+{
+    if (conn->role != QDR_ROLE_ROUTE_CONTAINER)
+        return;
+
+    if (connection_field) {
+        qdr_conn_identifier_t *cid = qdr_route_declare_id_CT(core, 0, connection_field->iterator);
+        qdr_add_connection_ref(&cid->connection_refs, conn);
+        conn->conn_id = cid;
+        activate_route_connection(core, conn, conn->conn_id);
+        if (container_field) {
+            cid = qdr_route_declare_id_CT(core, container_field->iterator, 0);
+            qdr_add_connection_ref(&cid->connection_refs, conn);
 
 Review comment:
   Q: after adding the second connection_ref (616), if the conn_id and the cid are equal the new cid is not saved in the conn's alt_conn_id.
   
   Does this leak a cid?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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