[pjsip] Client registration layer locking

Benny Prijono bennylp at pjsip.org
Fri Nov 16 03:03:11 EST 2007


Hi Philippe,

the lack of mutex protection in regc was pretty much intentional, as 
once the regc is created, all updates to the structure will be done 
from the transaction callback. And since regc does not allow more 
than one transactions to run at the same time, we should be safe. 
Well at least that's the way it was supposed to work.

cheers,
  -benny

Philippe wrote:
> Hi,
> 
> By examining the pjsip-ua layer providing the client registration 
> (regc), we notice that no locking mechanism is used.
> 
> It seems that this can cause some potential risks if we are using worker 
> threads as the reception callback or the timer can access the regc 
> structure at the same time that the regc APIs.
> 
> Other layers, such as the invite or xfer use the lock of the underlying 
> dialog.
> 
>  
> 
> Philippe Leuba
> 
> eyeP Media SA
> 






More information about the pjsip mailing list