| 1507 | } |
| 1508 | |
| 1509 | void CDestLinks::FreeSockLink(CSockLink* sock) |
| 1510 | { |
| 1511 | if ((sock == NULL) || (sock->GetParentsPtr() != (void*)this)) |
| 1512 | { |
| 1513 | MTLOG_ERROR("invalid socklink %p, error", sock); |
| 1514 | return; |
| 1515 | } |
| 1516 | |
| 1517 | TAILQ_REMOVE(&_sock_list, sock, _link_entry); |
| 1518 | if (this->_curr_link > 0) { |
| 1519 | this->_curr_link--; |
| 1520 | } |
| 1521 | |
| 1522 | sock->Reset(); |
| 1523 | CNetMgr::Instance()->FreeSockLink(sock); |
| 1524 | } |
| 1525 | |
| 1526 | CSockLink* CDestLinks::GetSockLink() |
| 1527 | { |
no test coverage detected