MCPcopy Create free account
hub / github.com/apache/httpd / cleanup_challenge_inspector

Function cleanup_challenge_inspector

modules/md/md_reg.c:1038–1064  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036} cleanup_challenge_ctx;
1037
1038static apr_status_t cleanup_challenge_inspector(void *baton, const char *dir, const char *name,
1039 md_store_vtype_t vtype, void *value,
1040 apr_pool_t *ptemp)
1041{
1042 cleanup_challenge_ctx *ctx = baton;
1043 const md_t *md;
1044 int i, used;
1045 apr_status_t rv;
1046
1047 (void)value;
1048 (void)vtype;
1049 (void)dir;
1050 for (used = 0, i = 0; i < ctx->mds->nelts && !used; ++i) {
1051 md = APR_ARRAY_IDX(ctx->mds, i, const md_t *);
1052 used = !strcmp(name, md->name);
1053 }
1054 if (!used) {
1055 md_log_perror(MD_LOG_MARK, MD_LOG_DEBUG, 0, ptemp,
1056 "challenges/%s: not in use, purging", name);
1057 rv = md_store_purge(ctx->reg->store, ctx->p, MD_SG_CHALLENGES, name);
1058 if (APR_SUCCESS != rv) {
1059 md_log_perror(MD_LOG_MARK, MD_LOG_WARNING, rv, ptemp,
1060 "challenges/%s: unable to purge", name);
1061 }
1062 }
1063 return APR_SUCCESS;
1064}
1065
1066apr_status_t md_reg_cleanup_challenges(md_reg_t *reg, apr_pool_t *p, apr_pool_t *ptemp,
1067 apr_array_header_t *mds)

Callers

nothing calls this directly

Calls 2

md_log_perrorFunction · 0.85
md_store_purgeFunction · 0.85

Tested by

no test coverage detected