From: Kurt Zeilenga Date: Wed, 30 Aug 2000 22:24:21 +0000 (+0000) Subject: reorder tests X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2136 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=563fd083e9c566e356f95862c12448d52aa60e40;p=openldap reorder tests --- diff --git a/servers/slapd/starttls.c b/servers/slapd/starttls.c index f59f15adb4..bd12f32c73 100644 --- a/servers/slapd/starttls.c +++ b/servers/slapd/starttls.c @@ -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;