InsightSoftwareConsortium / InsightSoftwareConsortium/DCMTK-old
Cannot receive DICOM files with "-su" from more than one Association
- Dominant language
- C++
- Stars
- 24
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/InsightSoftwareConsortium/DCMTK/blob/a0c30e286dda57c0bc436f8dac4871129a4390ed/dcmnet/apps/storescp.cc#L2098
For `storescp` using the `-su` and `--fork` flags, the scenario where `mkdir()` returns `-1` does not check `errno` to distinguish between `EEXIST` and other error scenarios. This means that `storescp` will end up aborting the Association if the directory already exists (race condition if there are more than one Associations C-STORE-ing the same Study Instance UID). It would be appropriate to abort for any other scenario, but for `EEXIST` the `storescp` child process should continue on without aborting.
Man page for mkdir for Linux listing the `errno` scenarios when the return value is -1:
https://linux.die.net/man/3/mkdir
I can create a pull request to make this change. Let me know.
Thanks,
Greg Smethells
Medstrat CTO
[www.medstrat.com](https://www.medstrat.com)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.