Hello. I am developing application based on DCMT. Application accepts ECHO, STORE, FIND and MOVE commands. When application has some problems fith filesystem I would like to reject STORE command while still accepting others. When should I do it? Before receiving DIMSE command I cannot tell if it is a STORE request. But when I release association after receiving DIMSE command, client (STORESCU) has some nasty error messages: TCP/IO error (No error) in routine...
How should I do it in "polite" way?
Rejecting association with STORE request
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
So, in storeSCPCallback , when progress->state is DIMSE_StoreBegin, I set rsp->DimseStatus to STATUS_STORE_Refused_OutOfResources. STORESCU didn't relase, kept sending data. In STORESCU log was no error indication. So I add in storeSCPCallback call to ASC_releaseAssociation. STORESCU displayed "Protocol Error: peer requested release (Aborting)". Is there a better way?
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
if you receive the C-STORE-RQ message, just respond with C-STORE-RSP with error code. The right place to insert your handler is in processCommands():
Look into the storeSCP handler and instead of sending a success message, send a C-STORE-RSP with error status, e.g. status "Refused: Out of Resources" may fit in your case.
Best regards,
Michael
if you receive the C-STORE-RQ message, just respond with C-STORE-RSP with error code. The right place to insert your handler is in processCommands():
Code: Select all
switch (msg.CommandField)
{
case DIMSE_C_ECHO_RQ:
// process C-ECHO-Request
cond = echoSCP(assoc, &msg, presID);
break;
case DIMSE_C_STORE_RQ:
// process C-STORE-Request
cond = storeSCP(assoc, &msg, presID);
break;
default:
// we cannot handle this kind of message
cond = DIMSE_BADCOMMANDTYPE;
OFLOG_ERROR(storescpLogger, "cannot handle command: 0x"
<< STD_NAMESPACE hex << OFstatic_cast(unsigned, msg.CommandField));
break;
Best regards,
Michael
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 1 guest