diff options
Diffstat (limited to 'base/tps/src/tus/tus_db.c')
-rw-r--r-- | base/tps/src/tus/tus_db.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/tps/src/tus/tus_db.c b/base/tps/src/tus/tus_db.c index c865bc371..9ae451415 100644 --- a/base/tps/src/tus/tus_db.c +++ b/base/tps/src/tus/tus_db.c @@ -4209,7 +4209,7 @@ TPS_PUBLIC int is_tus_db_entry_disabled(char *cn) LDAPMessage *result = NULL; LDAPMessage *e = NULL; struct berval **v = NULL; - int disabled = 0; + int disabled = 1; int rc = -1; if (cn != NULL && PL_strlen(cn) > 0) { @@ -4218,8 +4218,9 @@ TPS_PUBLIC int is_tus_db_entry_disabled(char *cn) if (e != NULL) { if ((v = ldap_get_values_len(ld, e, TOKEN_STATUS)) != NULL) { if ((valid_berval(v)) && (PL_strlen(v[0]->bv_val) > 0)) { - if (!PL_strcasecmp(v[0]->bv_val, STATE_DISABLED)) { - disabled = 1; + if (!PL_strcasecmp(v[0]->bv_val, STATE_ACTIVE) || + !PL_strcasecmp(v[0], STATE_UNINITIALIZED)) { + disabled = 0; } } if( v != NULL ) { |