mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Make this work on C++03 as well.
This commit is contained in:
@@ -508,17 +508,16 @@ std::list<SHAMap::fetchPackEntry_t> SHAMap::getFetchPack(SHAMap* have, bool incl
|
|||||||
|
|
||||||
boost::recursive_mutex::scoped_lock ul1(mLock);
|
boost::recursive_mutex::scoped_lock ul1(mLock);
|
||||||
|
|
||||||
UPTR_T< boost::unique_lock<boost::recursive_mutex> > ul2;
|
boost::shared_ptr< boost::unique_lock<boost::recursive_mutex> > ul2;
|
||||||
|
|
||||||
if (have)
|
if (have)
|
||||||
{
|
{
|
||||||
UPTR_T< boost::unique_lock<boost::recursive_mutex> > ul3(
|
ul2 = boost::make_shared< boost::unique_lock<boost::recursive_mutex> >(have->mLock, boost::try_to_lock);
|
||||||
new boost::unique_lock<boost::recursive_mutex>(have->mLock, boost::try_to_lock));
|
if (!(*ul2))
|
||||||
if (!(*ul3))
|
|
||||||
{
|
{
|
||||||
cLog(lsINFO) << "Unable to create pack due to lock";
|
cLog(lsINFO) << "Unable to create pack due to lock";
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ul2.swap(ul3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user