Hi Michael!
I don't undestand... where (or when) should I do locking?
I attach the sample app. It's based en echo_tool.c
I don't do anything complicated. Just launch 4 threads and start sending packages to another pc, which have the same app that launch 4 threads.
should I use the sockeapi to be thread safe ?
Regards,
Julio
On 5/22/06, Michael Tuexen < Michael.Tuexen AT micmac.franken.de> wrote:Hi Julio,
the sctplib is NOT thread safe. So do you do the necessary locking?
Best regards
Michael
On May 22, 2006, at 2:33 AM, Julio Kriger wrote:
> Hi!
> I have program that launch 4 threads, each thread open a SCTP
> connection to another PC. And a weird bug present (actually is a
> segmentation fault). Here is some code;
>
> sctpInstance = SCTP_registerInstance(cp->sourcePort,
> inputStreams, outputStreams, noOfLocalAddresses, localAddressList,
> LLServerEchoUlp);
>
> //sleep(5);
>
> SCTP_associate(sctpInstance, outputStreams,
> destinationAddress, cp->destPort, clientParamIndex);
>
> If I don't put the "sleep", everyhing works good. But ...
>
> If I put the "sleep" for 10 seconds (on each thread) I get a core
> dump:
>
> (gdb) down
> #0 0xb7ef8c82 in scu_associate (noOfOutStreams=1, noOfInStreams=1,
> destinationList=0x1, numDestAddresses=1, withPRSCTP=1) at SCTP-
> control.c:399
> (gdb) Quit
> (gdb) Quit
> (gdb)
>
> Does anyone has an idea why this happens? I'm working with version
> 1.0.3. Ths bug if fixed on 1.0.4 ?
>
> Regards,
> Julio
>
> --
> --
> Stewie: [After Lois tries to feed Stewie his broccoli "airplane
> style"] Damn you, Damn the Broccoli, and Damn the Wright Brothers.
> ----------------------------
> Julio Kriger
> mailto:
juliokriger AT gmail.com
--
--
Stewie: [After Lois tries to feed Stewie his broccoli "airplane style"] Damn you, Damn the Broccoli, and Damn the Wright Brothers.
----------------------------
Julio Kriger
mailto:juliokriger AT gmail.com
<echo_tool2.c>
Archive powered by MHonArc 2.6.19+.