From: Mark Valence Date: Sat, 25 Sep 1999 03:53:17 +0000 (+0000) Subject: fixed LDAP_OPT_X_TLS case of ldap_pvt_tls_config(). X-Git-Tag: UCDATA_2_4~375 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9e7243015c0543339958755ca822618bb1bff171;p=openldap fixed LDAP_OPT_X_TLS case of ldap_pvt_tls_config(). ldap_pvt_tls_set_option() expects int* as third param. --- diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index 0a6f47fe22..53c4e3b080 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -379,21 +379,19 @@ ldap_pvt_tls_config( struct ldapoptions *lo, int option, const char *arg ) ( strcasecmp( arg, "true" ) == 0 ) ); return ldap_pvt_tls_set_option( NULL, option, (void *) &i ); case LDAP_OPT_X_TLS: + i = -1; if ( strcasecmp( arg, "never" ) == 0 ) - return ldap_pvt_tls_set_option( lo, option, - LDAP_OPT_X_TLS_NEVER ); + i = LDAP_OPT_X_TLS_NEVER ; if ( strcasecmp( arg, "demand" ) == 0 ) - return ldap_pvt_tls_set_option( lo, option, - LDAP_OPT_X_TLS_DEMAND ); + i = LDAP_OPT_X_TLS_DEMAND ; if ( strcasecmp( arg, "allow" ) == 0 ) - return ldap_pvt_tls_set_option( lo, option, - LDAP_OPT_X_TLS_ALLOW ); + i = LDAP_OPT_X_TLS_ALLOW ; if ( strcasecmp( arg, "try" ) == 0 ) - return ldap_pvt_tls_set_option( lo, option, - LDAP_OPT_X_TLS_TRY ); + i = LDAP_OPT_X_TLS_TRY ; if ( strcasecmp( arg, "hard" ) == 0 ) - return ldap_pvt_tls_set_option( lo, option, - LDAP_OPT_X_TLS_HARD ); + i = LDAP_OPT_X_TLS_HARD ; + if (i >= 0) + return ldap_pvt_tls_set_option( lo, option, &i ); return -1; default: return -1;