From 9e7243015c0543339958755ca822618bb1bff171 Mon Sep 17 00:00:00 2001 From: Mark Valence Date: Sat, 25 Sep 1999 03:53:17 +0000 Subject: [PATCH] fixed LDAP_OPT_X_TLS case of ldap_pvt_tls_config(). ldap_pvt_tls_set_option() expects int* as third param. --- libraries/libldap/tls.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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; -- 2.39.5