while reading registrar/usrloc code, i noticed that save.c/unregister() calls ul.unlock_udomain() without ever calling ul.lock_udomain(). is this a bug?
-- juha
No.
The lock occurs within usrloc when you lookup a record by ruid.
On 13 May 2013, at 06:36, Juha Heinanen jh@tutpro.com wrote:
while reading registrar/usrloc code, i noticed that save.c/unregister() calls ul.unlock_udomain() without ever calling ul.lock_udomain(). is this a bug?
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 13/05/13 09:33, Juha Heinanen wrote:
get_urecord_by_ruid() calls lock_ulslot(). does that lock also udomain?
Yes
to me it would look better if lock/ulock would be done at the same level in the code.
Indeed, but the ruid based function was already there, behaved this way, and was exported to other modules. I had no time (or desire) to make deeper changes so I just used what was already there, but I don't have any objections to someone else doing it more nicely.