|
|
@ -751,6 +751,7 @@ namespace data |
|
|
|
if (it == m_RequestedDestinations.end ()) // not exist yet
|
|
|
|
if (it == m_RequestedDestinations.end ()) // not exist yet
|
|
|
|
{ |
|
|
|
{ |
|
|
|
RequestedDestination * d = new RequestedDestination (dest, isLeaseSet, isExploratory, pool); |
|
|
|
RequestedDestination * d = new RequestedDestination (dest, isLeaseSet, isExploratory, pool); |
|
|
|
|
|
|
|
std::unique_lock<std::mutex> l(m_RequestedDestinationsMutex); |
|
|
|
m_RequestedDestinations[dest] = d; |
|
|
|
m_RequestedDestinations[dest] = d; |
|
|
|
return d; |
|
|
|
return d; |
|
|
|
} |
|
|
|
} |
|
|
@ -764,6 +765,7 @@ namespace data |
|
|
|
if (it != m_RequestedDestinations.end ()) |
|
|
|
if (it != m_RequestedDestinations.end ()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
delete it->second; |
|
|
|
delete it->second; |
|
|
|
|
|
|
|
std::unique_lock<std::mutex> l(m_RequestedDestinationsMutex); |
|
|
|
m_RequestedDestinations.erase (it); |
|
|
|
m_RequestedDestinations.erase (it); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -774,6 +776,7 @@ namespace data |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (dest) |
|
|
|
if (dest) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
std::unique_lock<std::mutex> l(m_RequestedDestinationsMutex); |
|
|
|
m_RequestedDestinations.erase (dest->GetDestination ()); |
|
|
|
m_RequestedDestinations.erase (dest->GetDestination ()); |
|
|
|
delete dest; |
|
|
|
delete dest; |
|
|
|
} |
|
|
|
} |
|
|
|