Code: Select all
if (cond.good())
{
do {
nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(pdu.length + 6)) : 0;
} while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
if ((unsigned long) nbytes != pdu.length + 6)
{
OFString msg = "TCP I/O Error (";
msg += OFStandard::getLastNetworkErrorCode().message();
msg += ") occurred in routine: sendAssociationRJTCP";
return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str());
}
}
if (b != buffer) free(b);
return cond;
}