Skip to content

Commit e010093

Browse files
committed
always return "updated" if we updated something
1 parent 95e6d46 commit e010093

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/modules/rlm_cache/rlm_cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,10 +1300,11 @@ static unlang_action_t CC_HINT(nonnull) mod_method_store(unlang_result_t *p_resu
13001300
* insert.
13011301
*/
13021302
cache_insert(p_result, inst, request, &handle, key, env->maps, ttl);
1303+
if (p_result->rcode == RLM_MODULE_FAIL) goto finish;
1304+
p_result->rcode = RLM_MODULE_UPDATED;
13031305

13041306
finish:
13051307
cache_unref(request, inst, entry, handle);
1306-
if (p_result->rcode == RLM_MODULE_OK) p_result->rcode = RLM_MODULE_UPDATED;
13071308

13081309
return UNLANG_ACTION_CALCULATE_RESULT;
13091310
}

0 commit comments

Comments
 (0)