move state assignment to a more natural place
... so it's right next to the related callback assignment.
This commit is contained in:
parent
c5d3565db5
commit
2117945838
|
@ -299,6 +299,7 @@ socket_start_tls( conn_t *conn, void (*cb)( int ok, void *aux ) )
|
|||
static int ssl_inited;
|
||||
|
||||
conn->callbacks.starttls = cb;
|
||||
conn->state = SCK_STARTTLS;
|
||||
|
||||
if (!ssl_inited) {
|
||||
SSL_library_init();
|
||||
|
@ -329,7 +330,6 @@ socket_start_tls( conn_t *conn, void (*cb)( int ok, void *aux ) )
|
|||
}
|
||||
SSL_set_mode( conn->ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER );
|
||||
socket_expect_read( conn, 1 );
|
||||
conn->state = SCK_STARTTLS;
|
||||
start_tls_p2( conn );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user