mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
fixed deadlock caused by wrong order in mutex lock
This commit is contained in:
parent
12e556c204
commit
8539dd503a
@ -1028,12 +1028,18 @@ bool RsGxsNetTunnelService::receiveSearchRequest(unsigned char *search_request_d
|
|||||||
max_allowed_hits = RS_GXS_NET_TUNNEL_MAX_ALLOWED_HITS_GROUP_SEARCH ;
|
max_allowed_hits = RS_GXS_NET_TUNNEL_MAX_ALLOWED_HITS_GROUP_SEARCH ;
|
||||||
|
|
||||||
std::list<RsGxsGroupSummary> results ;
|
std::list<RsGxsGroupSummary> results ;
|
||||||
|
RsNetworkExchangeService *service = nullptr;
|
||||||
|
|
||||||
RS_STACK_MUTEX(mGxsNetTunnelMtx);
|
{
|
||||||
|
RS_STACK_MUTEX(mGxsNetTunnelMtx);
|
||||||
|
|
||||||
auto it = mSearchableServices.find(substring_sr->service) ;
|
auto it = mSearchableServices.find(substring_sr->service) ;
|
||||||
|
|
||||||
if(it != mSearchableServices.end() && it->second->search(substring_sr->substring_match,results))
|
if(it != mSearchableServices.end())
|
||||||
|
service = it->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(service != nullptr && service->search(substring_sr->substring_match,results))
|
||||||
{
|
{
|
||||||
RsGxsNetTunnelTurtleSearchGroupSummaryItem search_result_item ;
|
RsGxsNetTunnelTurtleSearchGroupSummaryItem search_result_item ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user