| 1671 | } |
| 1672 | |
| 1673 | CDestLinks* CNetMgr::FindCreateDest(CDestLinks* key) |
| 1674 | { |
| 1675 | CDestLinks* dest = this->FindDestLink(key); |
| 1676 | if (dest != NULL) |
| 1677 | { |
| 1678 | MTLOG_DEBUG("dest links reuse ok"); |
| 1679 | return dest; |
| 1680 | } |
| 1681 | |
| 1682 | dest = this->AllocDestLink(); |
| 1683 | if (NULL == dest) |
| 1684 | { |
| 1685 | MTLOG_ERROR("dest links alloc failed, log it"); |
| 1686 | return NULL; |
| 1687 | } |
| 1688 | |
| 1689 | dest->CopyKeyInfo(key); |
| 1690 | dest->StartTimer(); |
| 1691 | this->InsertDestLink(dest); |
| 1692 | |
| 1693 | return dest; |
| 1694 | } |
| 1695 | |
| 1696 | void CNetMgr::DeleteDestLink(CDestLinks* dst) |
| 1697 | { |
no test coverage detected