Then I need another C-STORE SCP, in a different port (5678), with a different AE. So I have set up a second thread for that purpose; at the moment it's something very simple (and it won't get much more complex than that, just some error handling and configurability):
Code: Select all
storscp = new DcmStorageSCP();
storscp->loadAssociationConfiguration("/etc/dcmtk/storescp.cfg",
"Default");
storscp->setOutputDirectory("/some/dir");
storscp->setAETitle("AUXSCP");
storscp->setPort(5678);
// does not return
storscp->listen();
Code: Select all
W: SOPClassUID (0008,0016) violates VR definition in SOPCommonModule
If I only comment out the storscp->listen() call and replace it with an infinite sleep loop, DSRDocument::read() works fine again, and the file is correctly processed.
This is 100% reproducible; the read() call only works when the listen() call is not executed, and it only fails when the listen() call is executing.
According to this FAQ entry: https://forum.dcmtk.org/viewtopic.php?t=24 DCMTK is thread-safe starting with version 3.6.2. I'm using version 3.6.5 as packaged by Debian.
What may be going on here?