Start storescp in new thread crashing

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
ashishbme
Posts: 30
Joined: Tue, 2011-05-10, 14:32

Start storescp in new thread crashing

#1 Post by ashishbme »

Hi,
i am trying to start storescp in new thread, when i code reached at receiveTransportConnectionTCP in dul.cc application crashing at bold area in code given below.
is it because of this timeout_val.tv_usec = 0?

#endif /* __MINGW32__ */
#endif /* DCMTK_HAVE_POLL */
timeout_val.tv_sec = 5;
timeout_val.tv_usec = 0;
#ifdef DCMTK_HAVE_POLL
nfound = poll(pfd, 1, timeout_val.tv_sec*1000+(timeout_val.tv_usec/1000));
#else
#ifdef HAVE_INTP_SELECT
nfound = select(
OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1),
(int *)(&fdset), NULL, NULL, &timeout_val);
#else
// On Win32, it is safe to cast the first parameter to int
// because Windows ignores this parameter anyway.
nfound = select(
OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1),
&fdset, NULL, NULL, &timeout_val);


Or Is it due to firewall blocking it?
Thank you
Ashish

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Start storescp in new thread crashing

#2 Post by Michael Onken »

Hi,

maybe you are re-using data structures between your threads? Otherwise no idea.

Best regards,
Michael

ashishbme
Posts: 30
Joined: Tue, 2011-05-10, 14:32

Re: Start storescp in new thread crashing

#3 Post by ashishbme »

Hi Michael,

Thank you for reply :D . Yes i while debugging i realized, it is due to port issue.

Regards
Ashish

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest