made lib more robust if server sends duplicate connect channel response

This commit is contained in:
Jeff Hill
2009-07-14 22:39:41 +00:00
parent 7d2be4f947
commit d7ae0fbce6
3 changed files with 16 additions and 5 deletions

View File

@@ -1046,9 +1046,16 @@ bool cac::createChannelRespAction (
else {
sidTmp = pChan->getSID (guard);
}
iiu.connectNotify ( guard, *pChan );
pChan->connect ( hdr.m_dataType, hdr.m_count, sidTmp,
mgr.cbGuard, guard );
bool wasExpected = iiu.connectNotify ( guard, *pChan );
if ( wasExpected ) {
pChan->connect ( hdr.m_dataType, hdr.m_count, sidTmp,
mgr.cbGuard, guard );
}
else {
errlogPrintf (
"CA Client Library: Ignored duplicate create channel "
"response from CA server?\n" );
}
}
else if ( iiu.ca_v44_ok ( guard ) ) {
// this indicates a claim response for a resource that does