Good morning ,
Currently i am using storescu-tls to transfer dicom material to a given remote pac's (owned by me) .
after the execution completed , I remove the files from the local directory using Linux rm command .
the problem is that with this strategy i cant handle error , for e.g. connection failure . in this case in the manner of Linux machine storescu runed successfully even though files weren't arrived .
there is any way to get any acknowledge when association released \ or when error occured?
storescu will return a nonzero return code if anything went wrong. You can use that to determine that the files should not be deleted yet, but the return code as such will not tell you what exactly went wrong or which image was not fully transmitted.
Furthermore, running storescu with "sudo" is a very bad idea.
Hey Marco, good morning
thank you very much for your response, I completely missed it out .
when your saying running storescu with sudo is a bad idea , what is the reason for that ?
what is your recommendation solution running it ?
In addition , where can I handle the returned nonzero code, there are some documentation regarding this ?
best regards, Dan
when your saying running storescu with sudo is a bad idea , what is the reason for that ?
A tool should, in general, always run with the least required privileges. storescu does not need root access rights. The only possible reason might be that it runs as a user that cannot access the DICOM files to be sent. In that case, the access rights should be fixed (e.g. by assigning them to a group shared by the creator and the user running storescu). If anything goes wrong, a process running as root would be able to erase your entire system.