rqpc.getTransferSyntax());
}
private TransferCapability roleSelection(AAssociateRQ rq,
AAssociateAC ac, String asuid) {
RoleSelection rqrs = rq.getRoleSelectionFor(asuid);
if (rqrs == null)
return getTC(scpTCs, asuid, rq);
RoleSelection acrs = ac.getRoleSelectionFor(asuid);
if (acrs != null)
return getTC(acrs.isSCU() ? scpTCs : scuTCs, asuid, rq);
TransferCapability tcscu = null;
TransferCapability tcscp = null;
boolean scu = rqrs.isSCU()
&& (tcscp = getTC(scpTCs, asuid, rq)) != null;
boolean scp = rqrs.isSCP()
&& (tcscu = getTC(scuTCs, asuid, rq)) != null;
ac.addRoleSelection(new RoleSelection(asuid, scu, scp));
return scu ? tcscp : tcscu;
}