summaryrefslogtreecommitdiff
path: root/res/res_pjsip_registrar.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_pjsip_registrar.c')
-rw-r--r--res/res_pjsip_registrar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_pjsip_registrar.c b/res/res_pjsip_registrar.c
index a39dac676..f99a3b84d 100644
--- a/res/res_pjsip_registrar.c
+++ b/res/res_pjsip_registrar.c
@@ -525,12 +525,12 @@ static int register_aor(pjsip_rx_data *rdata,
struct ao2_container *contacts = NULL;
struct ast_named_lock *lock;
- lock = ast_named_lock_get(AST_NAMED_LOCK_TYPE_RWLOCK, "aor", aor_name);
+ lock = ast_named_lock_get(AST_NAMED_LOCK_TYPE_MUTEX, "aor", aor_name);
if (!lock) {
return PJ_TRUE;
}
- ao2_wrlock(lock);
+ ao2_lock(lock);
contacts = ast_sip_location_retrieve_aor_contacts_nolock(aor);
if (!contacts) {
ao2_unlock(lock);