DcmSCPPool, stopAfterCurrentAssociations not working

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
renu.khorwal
Posts: 2
Joined: Tue, 2021-02-02, 13:46

DcmSCPPool, stopAfterCurrentAssociations not working

#1 Post by renu.khorwal »

I did not find an option to create a new post so asking my query in response to this post as my query is related to it.

I have created a dicom server that handles Normalised DIMSE requests
and C-store request from a client

Code: Select all

struct DicomScpThreadPool_C
    : public DcmSCPPool<DicomServer_C>
    , public OFThread
{
    OFCondition status
protected:
    void run()
    {
        status = listen();
    }
};
DicomScpThreadPool_C dcm_pool = new DicomScpThreadPool_C
dcm_pool->start();

Before application shutdown or after a specific action the
dicom server should stop listening. The client will keep sending
connection request but the server should have closed the connection
and not listen to these requests.

I tried achieving this using DcmSCPPool's stopAfterCurrentAssociations
but it doesn't seem to work. I looked at definition of this function in
scppool.cc and I see no reason for it to not work. Also, since this function
does not return anything its status cannot be determined.

Code: Select all

dcm_pool->stopAfterCurrentAssociations();
dcm_pool->join();
Is there anything which I am missing?

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest