qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1634572 - /qpid/proton/branches/examples/proton-c/src/transport/transport.c
Date Mon, 27 Oct 2014 15:25:48 GMT
Author: gsim
Date: Mon Oct 27 15:25:47 2014
New Revision: 1634572

URL: http://svn.apache.org/r1634572
Log:
PROTON-723: allow incoming link to coordinator to be detected

Modified:
    qpid/proton/branches/examples/proton-c/src/transport/transport.c

Modified: qpid/proton/branches/examples/proton-c/src/transport/transport.c
URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/proton-c/src/transport/transport.c?rev=1634572&r1=1634571&r2=1634572&view=diff
==============================================================================
--- qpid/proton/branches/examples/proton-c/src/transport/transport.c (original)
+++ qpid/proton/branches/examples/proton-c/src/transport/transport.c Mon Oct 27 15:25:47 2014
@@ -695,7 +695,15 @@ int pn_do_attach(pn_dispatcher_t *disp)
     pn_terminus_set_timeout(rtgt, tgt_timeout);
     pn_terminus_set_dynamic(rtgt, tgt_dynamic);
   } else {
-    pn_terminus_set_type(rtgt, PN_UNSPECIFIED);
+    uint64_t code = 0;
+    pn_data_clear(link->remote_target.capabilities);
+    err = pn_scan_args(disp, "D.[.....D..DL[C]...]", &code,
+                       link->remote_target.capabilities);
+    if (code == 0x30) {
+      pn_terminus_set_type(rtgt, PN_COORDINATOR);
+    } else {
+      pn_terminus_set_type(rtgt, PN_UNSPECIFIED);
+    }
   }
 
   if (snd_settle)



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


Mime
View raw message