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

Re: [reSIProcate] [DialogUsagManager] InMemoryRegistrationDatabase usage.


You are supposed to use the lockRecord and unlockRecord APIs if you want to modify or read the contact list of a particular AOR.  There are a number of examples of this around the resip code.

Regards,
Scott

On Tue, Feb 3, 2015 at 10:11 AM, palladin <p-aladin@xxxxxxxxx> wrote:
Dear resip devels,
resiprocate 1.9.2

I have got a crash during InMemoryRegistrationDatabase usage. Sometimes I need to modify ContactInstanceRecord from separate thread.  As I can notice from InMemoryRegistrationDatabase::updateContact sources ContactList is fetched and mutex is unlocked. I suppose at the same time my thread tries to modify the same ContactList, because it is not any more protected from simultaneous access. As result crash.
Could you please consider provided patch? If it is not fine - please advice how can I safely update ContactList?

Sincerely Taras.

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel