ted-ross commented on a change in pull request #738:
URL: https://github.com/apache/qpid-dispatch/pull/738#discussion_r426624937



##########
File path: src/router_core/modules/edge_router/addr_proxy.c
##########
@@ -215,6 +215,50 @@ static void del_outlink(qcm_edge_addr_proxy_t *ap, 
qdr_address_t *addr)
     }
 }
 
+static void on_link_event(void *context, qdrc_event_t event, qdr_link_t *link)
+{
+    if (!link || !link->conn)
+        return;
+
+    //
+    // We only care if the link event is on an edge connection.
+    //
+    if (link->conn->role != QDR_ROLE_EDGE_CONNECTION)
+            return;
+
+    switch (event) {
+        case QDRC_EVENT_LINK_OUT_DETACHED: {
+            qdr_address_t *addr = link->owning_addr;
+            if (addr && addr->edge_outlink && link == addr->edge_outlink) {

Review comment:
       The second condition in the if is technically not necessary.  
edge_outlink is never dereferenced, only compared.




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to