[Opalvoip-svn] SF.net SVN: opalvoip:[24981] opal/trunk
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2010-12-22 11:43:32
|
Revision: 24981 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=24981&view=rev Author: rjongbloed Date: 2010-12-22 11:43:26 +0000 (Wed, 22 Dec 2010) Log Message: ----------- Use a snapshot copy of the active connections to avoid deadlock, restartable PSfePtr enumeration was abandoned. Modified Paths: -------------- opal/trunk/src/opal/rtpep.cxx Property Changed: ---------------- opal/trunk/ Property changes on: opal/trunk ___________________________________________________________________ Modified: svn:mergeinfo - /opal/branches/Sirius_A:23371,23374,23549,23560,23770 /opal/branches/Sirius_B:24566,24579,24589,24594,24596,24601,24604,24635-24636,24639-24642,24644,24651,24653,24655-24656,24683,24685,24714-24717,24771,24777-24783,24842,24845,24858,24947 /opal/branches/autoconf:20594-21001 /opal/branches/csoutheren/LalandeBranch1:23412-23413,23415,23424,23510,23516,23553,23577,23607,23669,23724,23742-23744,23747-23748,23755,23758,23780,23788,23848,23850,23856 /opal/branches/rjongbloed/BarnardPlus:20584,20656,20749,20751,20756,20762,20786,20789,20814,20820,20829,20831,20841,20843,20923,20927,20938,22016-22017,22518,22582,22941 /opal/branches/v3_2:21143,21220,21227,21253,21455 /opal/branches/v3_4:21060,21062,21088,21092,21111,21113,21115,21119,21143,21148,21151-21152,21155,21158,21184,21188,21253,21265-21266,21283-21284,21298,21300,21303,21307,21309,21311,21327,21331,21333,21359,21367,21369,21488,21556,21564-21565,21568,21570,21620,21625,21631,21748,21751,21756,21759,21761,21767,21770,22246,23044,23140,23143,23286 /opal/branches/v3_6:22169,22178,22184,22186,22197,22204,22216,22251,22253,22255,22258,22260,22291,22296,22300,22306,22308,22313,22319,22336,22353,22358,22436,22447,22449,22497,22511,22517,22519-22521,22527,22536,22538,22589,22596,22599,22617,22620,22622,22630,22640,22655,22675,22682,22726-22728,22730,22733,22738,22745-22746,22800,22820-22821,22842,22844-22845,22851,22853,22889,22896,22902,22904,22906,22918,22924,22928,22946,22965,22967,22976,22978,22980,22982,22994,23028,23123,23125-23126,23128,23157,23165,23173,23175,23183,23294,23341,23465,23467,23474,23521,23829,24346,24809 /opal/branches/v3_8:24025,24027,24029,24036,24038,24040,24042,24048,24050,24058,24061,24068,24071,24074,24076,24080,24082,24086-24087,24092,24099,24101,24105,24107,24109,24111,24114,24116-24117,24120-24121,24125,24127,24130,24132,24134,24138,24140,24144,24146,24148,24150-24151,24154,24156,24158,24162,24170,24218,24245,24257,24261,24340,24362-24363,24365,24369,24373,24422,24440,24442,24447,24489,24504,24506,24532,24536,24545,24547,24552,24554,24614,24678,24687,24699,24705,24775,24833,24861,24903 /ptlib/branches/v2_8:24136 /ptlib/trunk:20820 + /opal/branches/Sirius_A:23371,23374,23549,23560,23770 /opal/branches/Sirius_B:24566,24579,24589,24594,24596,24601,24604,24635-24636,24639-24642,24644,24651,24653,24655-24656,24683,24685,24714-24717,24771,24777-24783,24842,24845,24858,24947,24980 /opal/branches/autoconf:20594-21001 /opal/branches/csoutheren/LalandeBranch1:23412-23413,23415,23424,23510,23516,23553,23577,23607,23669,23724,23742-23744,23747-23748,23755,23758,23780,23788,23848,23850,23856 /opal/branches/rjongbloed/BarnardPlus:20584,20656,20749,20751,20756,20762,20786,20789,20814,20820,20829,20831,20841,20843,20923,20927,20938,22016-22017,22518,22582,22941 /opal/branches/v3_2:21143,21220,21227,21253,21455 /opal/branches/v3_4:21060,21062,21088,21092,21111,21113,21115,21119,21143,21148,21151-21152,21155,21158,21184,21188,21253,21265-21266,21283-21284,21298,21300,21303,21307,21309,21311,21327,21331,21333,21359,21367,21369,21488,21556,21564-21565,21568,21570,21620,21625,21631,21748,21751,21756,21759,21761,21767,21770,22246,23044,23140,23143,23286 /opal/branches/v3_6:22169,22178,22184,22186,22197,22204,22216,22251,22253,22255,22258,22260,22291,22296,22300,22306,22308,22313,22319,22336,22353,22358,22436,22447,22449,22497,22511,22517,22519-22521,22527,22536,22538,22589,22596,22599,22617,22620,22622,22630,22640,22655,22675,22682,22726-22728,22730,22733,22738,22745-22746,22800,22820-22821,22842,22844-22845,22851,22853,22889,22896,22902,22904,22906,22918,22924,22928,22946,22965,22967,22976,22978,22980,22982,22994,23028,23123,23125-23126,23128,23157,23165,23173,23175,23183,23294,23341,23465,23467,23474,23521,23829,24346,24809 /opal/branches/v3_8:24025,24027,24029,24036,24038,24040,24042,24048,24050,24058,24061,24068,24071,24074,24076,24080,24082,24086-24087,24092,24099,24101,24105,24107,24109,24111,24114,24116-24117,24120-24121,24125,24127,24130,24132,24134,24138,24140,24144,24146,24148,24150-24151,24154,24156,24158,24162,24170,24218,24245,24257,24261,24340,24362-24363,24365,24369,24373,24422,24440,24442,24447,24489,24504,24506,24532,24536,24545,24547,24552,24554,24614,24678,24687,24699,24705,24775,24833,24861,24903 /ptlib/branches/v2_8:24136 /ptlib/trunk:20820 Modified: opal/trunk/src/opal/rtpep.cxx =================================================================== --- opal/trunk/src/opal/rtpep.cxx 2010-12-22 11:41:19 UTC (rev 24980) +++ opal/trunk/src/opal/rtpep.cxx 2010-12-22 11:43:26 UTC (rev 24981) @@ -133,8 +133,12 @@ PTRACE(5, "RTPEp\tSession " << stream.GetSessionID() << ", " "remote RTP port " << remotePort << " not peviously remembered, searching."); - // Not already cached so search all RTP connections for if it is there - for (PSafePtr<OpalRTPConnection> connection(connectionsActive, PSafeReadOnly, true); connection != NULL; ++connection) { + /* Not already cached so search all RTP connections for if it is there + To avoid deadlocks take a snapshot of the active list at an instant + of time and iterate over that. The other connection MUST already be + there or it isn't a hairpinned call. */ + ConnectionDict snapshot(connectionsActive); + for (PSafePtr<OpalRTPConnection> connection(snapshot, PSafeReadOnly); connection != NULL; ++connection) { if (connection->FindSessionByLocalPort(remotePort) != NULL) { PTRACE(4, "RTPEp\tSession " << stream.GetSessionID() << ", " "remembering remote RTP port " << remotePort << " on connection " << *connection); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |