]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/options.c
ITS#6898 fix regression from ITS#6625
[openldap] / libraries / libldap / options.c
index a75d4598c248170e3084315645e401c7c5e239d8..3d940972d6b6e7915ea5a8fd57ba8c449ca11b43 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2010 The OpenLDAP Foundation.
+ * Copyright 1998-2011 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -778,19 +778,22 @@ ldap_set_option(
 
        default:
 #ifdef HAVE_TLS
-               if ( ldap_pvt_tls_set_option( ld, option, (void *)invalue ) == 0 )
+               if ( ldap_pvt_tls_set_option( ld, option, (void *)invalue ) == 0 ) {
                        LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
                        return ( LDAP_OPT_SUCCESS );
+               }
 #endif
 #ifdef HAVE_CYRUS_SASL
-               if ( ldap_int_sasl_set_option( ld, option, (void *)invalue ) == 0 )
+               if ( ldap_int_sasl_set_option( ld, option, (void *)invalue ) == 0 ) {
                        LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
                        return ( LDAP_OPT_SUCCESS );
+               }
 #endif
 #ifdef HAVE_GSSAPI
-               if ( ldap_int_gssapi_set_option( ld, option, (void *)invalue ) == 0 )
+               if ( ldap_int_gssapi_set_option( ld, option, (void *)invalue ) == 0 ) {
                        LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
                        return ( LDAP_OPT_SUCCESS );
+               }
 #endif
                /* bad param */
                break;  /* LDAP_OPT_ERROR */