| 1036 | } cleanup_challenge_ctx; |
| 1037 | |
| 1038 | static 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 | |
| 1066 | apr_status_t md_reg_cleanup_challenges(md_reg_t *reg, apr_pool_t *p, apr_pool_t *ptemp, |
| 1067 | apr_array_header_t *mds) |
nothing calls this directly
no test coverage detected