You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2014/10/27 16:25:48 UTC
svn commit: r1634572 -
/qpid/proton/branches/examples/proton-c/src/transport/transport.c
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