mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
reorder tests
This commit is contained in:
parent
e3a5562089
commit
563fd083e9
1 changed files with 10 additions and 10 deletions
|
|
@ -49,6 +49,16 @@ starttls_extop (
|
|||
goto done;
|
||||
}
|
||||
|
||||
/* can't start TLS if there are other op's around */
|
||||
if (( conn->c_ops != NULL &&
|
||||
(conn->c_ops != op || op->o_next != NULL)) ||
|
||||
( conn->c_pending_ops != NULL))
|
||||
{
|
||||
*text = "cannot start TLS when operations our outstanding";
|
||||
rc = LDAP_OPERATIONS_ERROR;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* fail if TLS could not be initialized */
|
||||
if (ldap_pvt_tls_get_option(NULL, LDAP_OPT_X_TLS_CERT, &ctx) != 0
|
||||
|| ctx == NULL)
|
||||
|
|
@ -64,16 +74,6 @@ starttls_extop (
|
|||
goto done;
|
||||
}
|
||||
|
||||
/* can't start TLS if there are other op's around */
|
||||
if (( conn->c_ops != NULL &&
|
||||
(conn->c_ops != op || op->o_next != NULL)) ||
|
||||
( conn->c_pending_ops != NULL))
|
||||
{
|
||||
*text = "cannot start TLS when operations our outstanding";
|
||||
rc = LDAP_OPERATIONS_ERROR;
|
||||
goto done;
|
||||
}
|
||||
|
||||
conn->c_is_tls = 1;
|
||||
conn->c_needs_tls_accept = 1;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue