< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

RE: [reSIProcate] Softphone call object


Hi,
        I am developing one Multithreaded application using resiprocate.
        I have two dum and it's associated two stacks, both runs in a single
thread.
        The code look like
                   while (true)
                  {
//Process for UAC
                          FdSet fdsetUac;

                          stackUac.buildFdSet(fdsetUac);
                          int err = 1;

                          fdsetUac.selectMilliSeconds(5);
                          assert ( err != -1 );

                          stackUac.process(fdsetUac);
                          while(DumUac->process());

//Process for UAS
                         FdSet fdsetUas;
                          stackUas.buildFdSet(fdsetUas);

                          fdsetUas.selectMilliSeconds(5);
                          assert ( err != -1 );

                          stackUas.process(fdsetUas);
                          while(DumUas->process());


                  }
        In my other thread i am using functions provided by dum like.
        dum->makeRegistration(uAor,appDialogSet),
        dum->send(regMessage) etc..

        Does this create some problem ?

Regards,
Niraj


-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx]On Behalf Of Scott
Godin
Sent: Thursday, November 17, 2005 12:48 AM
To: Dmytro Bogovych; resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [reSIProcate] Softphone call object
Importance: High


Technically you are not allowed to do this - dum is not thread safe.
You cannot call dum API's from one thread while dum->process is running
in another thread.  Please see the note on the wiki:
http://wiki.resiprocate.org/wiki/index.php?title=DUM_Threading




> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-
> devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Dmytro Bogovych
> Sent: Wednesday, November 16, 2005 2:14 PM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [reSIProcate] Softphone call object
>
> Greetings.
>
> In my softphone application I'm using subclassing AppDialogSet to
store
> specific data - RTP transmitter parameters etc.
>
> I'm trying to finish the established session in the next way:
> 1. Get stored AppDialogSetHandle
> 2. Check if AppDialogSetHandle.isValid()
> 3. If yes - then call AppDialogSetHandle->get()->end()
>
> Stack & DUM are running in first separate thread and this call is
running
> in the second separate thread.
>
> Question:
> Is there chance to get AppDialogSet deleted by first thread between
step 2
> and 3?
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel