From c461a959869acab0fabf1e658949f10befcdbc69 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Sat, 6 Oct 2007 12:55:37 +0000 Subject: [PATCH] fixed possible deadlock situation on incorrect localIP/raddr git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@515 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmSession.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 775de536..6253d91d 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -313,9 +313,14 @@ void AmSession::negotiate(const string& sdp_body, } lockAudio(); - rtp_str.setLocalIP(AmConfig::LocalIP); - rtp_str.setPassiveMode(passive_mode); - rtp_str.setRAddr(r_host, r_port); + try { + rtp_str.setLocalIP(AmConfig::LocalIP); + rtp_str.setPassiveMode(passive_mode); + rtp_str.setRAddr(r_host, r_port); + } catch (...) { + unlockAudio(); + throw; + } unlockAudio(); if(sdp_reply)