Latest update.
This commit is contained in:
@@ -54,6 +54,7 @@ void BIO_CONNECT_free(BIO_CONNECT *a);
|
||||
#define BIO_CONN_S_CONNECT 4
|
||||
#define BIO_CONN_S_OK 5
|
||||
#define BIO_CONN_S_BLOCKED_CONNECT 6
|
||||
#define BIO_CONN_S_CONNECT_ERROR 7
|
||||
|
||||
static const BIO_METHOD methods_connectp = {
|
||||
BIO_TYPE_CONNECT,
|
||||
@@ -172,7 +173,8 @@ static int conn_state(BIO *b, BIO_CONNECT *c)
|
||||
ERR_raise_data(ERR_LIB_SYS, get_last_socket_error(),
|
||||
"calling connect(%s, %s)",
|
||||
c->param_hostname, c->param_service);
|
||||
BIOerr(BIO_F_CONN_STATE, BIO_R_CONNECT_ERROR);
|
||||
c->state = BIO_CONN_S_CONNECT_ERROR;
|
||||
break;
|
||||
}
|
||||
goto exit_loop;
|
||||
} else {
|
||||
@@ -194,6 +196,11 @@ static int conn_state(BIO *b, BIO_CONNECT *c)
|
||||
c->state = BIO_CONN_S_OK;
|
||||
break;
|
||||
|
||||
case BIO_CONN_S_CONNECT_ERROR:
|
||||
BIOerr(BIO_F_CONN_STATE, BIO_R_CONNECT_ERROR);
|
||||
ret = 0;
|
||||
goto exit_loop;
|
||||
|
||||
case BIO_CONN_S_OK:
|
||||
ret = 1;
|
||||
goto exit_loop;
|
||||
@@ -411,7 +418,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
OPENSSL_free(hold_service);
|
||||
} else if (num == 1) {
|
||||
OPENSSL_free(data->param_service);
|
||||
data->param_service = BUF_strdup(ptr);
|
||||
data->param_service = OPENSSL_strdup(ptr);
|
||||
} else if (num == 2) {
|
||||
const BIO_ADDR *addr = (const BIO_ADDR *)ptr;
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user