| 360 | } |
| 361 | |
| 362 | HCollection GetCollectionByHash(HRegister regist, dmhash_t socket_name) |
| 363 | { |
| 364 | DM_MUTEX_SCOPED_LOCK(regist->m_Mutex); |
| 365 | uint32_t collection_count = regist->m_Collections.Size(); |
| 366 | for (uint32_t i = 0; i < collection_count; ++i) |
| 367 | { |
| 368 | Collection* collection = regist->m_Collections[i]; |
| 369 | if (collection->m_NameHash == socket_name) |
| 370 | return collection->m_HCollection; |
| 371 | } |
| 372 | return 0; |
| 373 | } |
| 374 | |
| 375 | void DeleteRegister(HRegister regist) |
| 376 | { |