In the storescp example included with dcmtk, there's an option to try aborting a store association mid-connection.
The code I'm looking at is:
Code: Select all
// determine if the association shall be aborted
if( (opt_abortDuringStore && progress->state != DIMSE_StoreBegin) ||
(opt_abortAfterStore && progress->state == DIMSE_StoreEnd) )
{
if (opt_verbose)
printf("ABORT initiated (due to command line options)\n");
ASC_abortAssociation((OFstatic_cast(StoreCallbackData*, callbackData))->assoc);
rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
return;
}
Is there any way to just kill the connection completely as soon as the cancel request is received, so the scu app doesn't even try sending any more images? Just wondering.
Thanks