From af444f48d626f23c39c3fccf9073fa4d6714f286 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Wed, 19 Mar 2025 08:55:46 +0100 Subject: [PATCH] MT#59962 db_reg_agent: fix some dead-locks Just some dead-locks. Change-Id: I2aaeb44f28867429f30ba3e750213f102b637a6b --- apps/db_reg_agent/DBRegAgent.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/db_reg_agent/DBRegAgent.cpp b/apps/db_reg_agent/DBRegAgent.cpp index bc40e9e0..b231c8fc 100644 --- a/apps/db_reg_agent/DBRegAgent.cpp +++ b/apps/db_reg_agent/DBRegAgent.cpp @@ -682,14 +682,14 @@ void DBRegAgent::updateRegistration(long object_id, if (type == TYPE_PEERING && it == registrations_peers.end()) { - handleRegistrationScheduling(object_id, auth_user_temp, user, pass, realm, contact, type); + handleRegistrationScheduling(object_id, auth_user_temp, user, pass, realm, contact, type); /* unlocks */ return; /* handle subscribers */ } else if (type != TYPE_PEERING && it == registrations.end()) { - handleRegistrationScheduling(object_id, auth_user_temp, user, pass, realm, contact, type); + handleRegistrationScheduling(object_id, auth_user_temp, user, pass, realm, contact, type); /* unlocks */ return; } @@ -734,6 +734,7 @@ void DBRegAgent::removeRegistration(long object_id, const regType type) { { if (!it->second) { WARN("Something went wrong while removing '%ld'\n", object_id); + registrations_mut.unlock(); return; } @@ -752,6 +753,7 @@ void DBRegAgent::removeRegistration(long object_id, const regType type) { { if (!it->second) { WARN("Something went wrong while removing '%ld'\n", object_id); + registrations_mut.unlock(); return; }