ChugR commented on a change in pull request #676: DISPATCH-1518: Added ability 
to turn on protocol frame trace logging …
URL: https://github.com/apache/qpid-dispatch/pull/676#discussion_r377764623
 
 

 ##########
 File path: src/router_node.c
 ##########
 @@ -1432,6 +1432,30 @@ static void CORE_link_second_attach(void *context, 
qdr_link_t *link, qdr_terminu
         qdr_link_stalled_outbound(link);
 }
 
+
+static void CORE_conn_trace(void *context, qdr_connection_t *qdr_conn, bool 
trace)
+{
+    qd_connection_t      *qconn  = (qd_connection_t*) 
qdr_connection_get_context(qdr_conn);
+
+    if (!qconn)
+        return;
+
+    pn_transport_t *tport  = pn_connection_transport(qconn->pn_conn);
+
+    if (!tport)
+        return;
+
+    if (trace) {
+        pn_transport_trace(tport, PN_TRACE_FRM);
+        pn_transport_set_tracer(tport, connection_transport_tracer);
+
+    }
+    else {
+        pn_transport_set_tracer(tport, 0);
 
 Review comment:
   When pn_tracer_t tracer is zero then an assert triggers in the proton code.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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

Reply via email to