mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fix deadlock
This commit is contained in:
@@ -103,10 +103,10 @@
|
||||
<ClCompile Include="src\Config.cpp" />
|
||||
<ClCompile Include="src\ConnectionPool.cpp" />
|
||||
<ClCompile Include="src\Contract.cpp" />
|
||||
<ClCompile Include="src\Conversion.cpp" />
|
||||
<ClCompile Include="src\DBInit.cpp" />
|
||||
<ClCompile Include="src\DeterministicKeys.cpp" />
|
||||
<ClCompile Include="src\ECIES.cpp" />
|
||||
<ClCompile Include="src\FieldNames.cpp" />
|
||||
<ClCompile Include="src\HashedObject.cpp" />
|
||||
<ClCompile Include="src\HttpsClient.cpp" />
|
||||
<ClCompile Include="src\Interpreter.cpp" />
|
||||
@@ -136,6 +136,7 @@
|
||||
<ClCompile Include="src\PubKeyCache.cpp" />
|
||||
<ClCompile Include="src\RequestParser.cpp" />
|
||||
<ClCompile Include="src\rfc1751.cpp" />
|
||||
<ClCompile Include="src\RippleCalc.cpp" />
|
||||
<ClCompile Include="src\RippleLines.cpp" />
|
||||
<ClCompile Include="src\RippleState.cpp" />
|
||||
<ClCompile Include="src\rpc.cpp" />
|
||||
@@ -156,7 +157,9 @@
|
||||
<ClCompile Include="src\SNTPClient.cpp" />
|
||||
<ClCompile Include="src\Suppression.cpp" />
|
||||
<ClCompile Include="src\Transaction.cpp" />
|
||||
<ClCompile Include="src\TransactionAction.cpp" />
|
||||
<ClCompile Include="src\TransactionEngine.cpp" />
|
||||
<ClCompile Include="src\TransactionErr.cpp" />
|
||||
<ClCompile Include="src\TransactionFormats.cpp" />
|
||||
<ClCompile Include="src\TransactionMaster.cpp" />
|
||||
<ClCompile Include="src\TransactionMeta.cpp" />
|
||||
|
||||
@@ -63,9 +63,6 @@
|
||||
<ClCompile Include="src\ConnectionPool.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Conversion.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DBInit.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -294,6 +291,18 @@
|
||||
<ClCompile Include="src\Operation.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FieldNames.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TransactionAction.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RippleCalc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TransactionErr.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="KnownNodeList.h">
|
||||
@@ -557,6 +566,7 @@
|
||||
<None Include="SConstruct" />
|
||||
<None Include="newcoind.cfg" />
|
||||
<None Include="validators.txt" />
|
||||
<None Include="README" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="src\newcoin.proto" />
|
||||
|
||||
@@ -33,15 +33,16 @@ SField::ref SField::getField(int code)
|
||||
|
||||
if ((type <= 0) || (field <= 0))
|
||||
return sfInvalid;
|
||||
{ //JED: Did this to fix a deadlock. david you should check. Line after this block also has a scoped lock
|
||||
// why doe sthis thing even need a mutex?
|
||||
boost::mutex::scoped_lock sl(mapMutex);
|
||||
|
||||
boost::mutex::scoped_lock sl(mapMutex);
|
||||
std::map<int, SField::ptr>::iterator it = codeToField.find(code);
|
||||
if (it != codeToField.end())
|
||||
return *(it->second);
|
||||
|
||||
std::map<int, SField::ptr>::iterator it = codeToField.find(code);
|
||||
if (it != codeToField.end())
|
||||
return *(it->second);
|
||||
|
||||
switch (type)
|
||||
{ // types we are willing to dynamically extend
|
||||
switch (type)
|
||||
{ // types we are willing to dynamically extend
|
||||
|
||||
#define FIELD(name, type, index)
|
||||
#define TYPE(name, type, index) case STI_##type:
|
||||
@@ -50,11 +51,13 @@ SField::ref SField::getField(int code)
|
||||
#undef TYPE
|
||||
|
||||
break;
|
||||
default:
|
||||
return sfInvalid;
|
||||
}
|
||||
default:
|
||||
return sfInvalid;
|
||||
}
|
||||
|
||||
std::string dynName = lexical_cast_i(type) + "/" + lexical_cast_i(field);
|
||||
std::string dynName = lexical_cast_i(type) + "/" + lexical_cast_i(field);
|
||||
}// end scope lock
|
||||
|
||||
return *(new SField(code, static_cast<SerializedTypeID>(type), field, dynName.c_str()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user