Fix am_cache_env_fetch_first.
This function is supposed to return the value of the entry we are looking for, but instead it returned the name. Fix it to return the value. Also, fix exit condition on for-loop. This fixes NameID-based logout.
This commit is contained in:
parent
22990058be
commit
7a24e4be0c
|
@ -489,12 +489,12 @@ const char *am_cache_env_fetch_first(am_cache_entry_t *t,
|
|||
const char *str;
|
||||
int i;
|
||||
|
||||
for (i = 0; t->size; i++) {
|
||||
for (i = 0; i < t->size; i++) {
|
||||
str = am_cache_entry_get_string(t, &t->env[i].varname);
|
||||
if (str == NULL)
|
||||
break;
|
||||
if (strcmp(str, var) == 0)
|
||||
return str;
|
||||
return am_cache_entry_get_string(t, &t->env[i].value);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue