diff --git a/sources/od_ldap.h b/sources/od_ldap.h index 4a90e9e6..e32778bd 100644 --- a/sources/od_ldap.h +++ b/sources/od_ldap.h @@ -1,6 +1,9 @@ #ifndef ODYSSEY_LDAP_H #define ODYSSEY_LDAP_H +// For functions ldap_unbind, ldap_search_s, ldap_simple_bind_s +#define LDAP_DEPRECATED 1 + #include typedef struct { diff --git a/sources/rules.c b/sources/rules.c index 5e0a93a8..a5eeebca 100644 --- a/sources/rules.c +++ b/sources/rules.c @@ -545,7 +545,7 @@ void od_rules_rule_free(od_rule_t *rule) free(rule->ldap_storage_credentials_attr); if (rule->ldap_endpoint) od_ldap_endpoint_free(rule->ldap_endpoint); - if (&rule->ldap_storage_creds_list) { + if (!od_list_empty(&rule->ldap_storage_creds_list)) { od_list_foreach_safe(&rule->ldap_storage_creds_list, i, n) { od_ldap_storage_credentials_t *lsc; @@ -1871,7 +1871,7 @@ void od_rules_print(od_rules_t *rules, od_logger_t *logger) " ldap_storage_credentials_attr %s", rule->ldap_storage_credentials_attr); } - if (&rule->ldap_storage_creds_list) { + if (!od_list_empty(&rule->ldap_storage_creds_list)) { od_list_t *f; od_list_foreach(&rule->ldap_storage_creds_list, f) {