| 1574 | } |
| 1575 | |
| 1576 | int Socket::ConductError(bthread_id_t id_wait) { |
| 1577 | pthread_mutex_lock(&_id_wait_list_mutex); |
| 1578 | if (Failed()) { |
| 1579 | const int error_code = non_zero_error_code(); |
| 1580 | if (id_wait != INVALID_BTHREAD_ID) { |
| 1581 | const std::string error_text = _error_text; |
| 1582 | pthread_mutex_unlock(&_id_wait_list_mutex); |
| 1583 | bthread_id_error2(id_wait, error_code, error_text); |
| 1584 | return 0; |
| 1585 | } else { |
| 1586 | pthread_mutex_unlock(&_id_wait_list_mutex); |
| 1587 | errno = error_code; |
| 1588 | return -1; |
| 1589 | } |
| 1590 | } else { |
| 1591 | pthread_mutex_unlock(&_id_wait_list_mutex); |
| 1592 | return 1; |
| 1593 | } |
| 1594 | } |
| 1595 | |
| 1596 | X509* Socket::GetPeerCertificate() const { |
| 1597 | if (ssl_state() != SSL_CONNECTED) { |
nothing calls this directly
no test coverage detected