Skip to content

Commit 1115388

Browse files
committed
Merge PR #365
restore fixes of #336 and #337 lost in sync with apache svn
1 parent 842cbf6 commit 1115388

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/md_reg.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,12 +865,24 @@ apr_status_t md_reg_sync_start(md_reg_t *reg, apr_array_header_t *master_mds, ap
865865
idx = md_array_str_index(ctx.store_names, md->name, 0, 1);
866866
if (idx < 0) {
867867
APR_ARRAY_PUSH(ctx.maybe_new_mds, md_t*) = md;
868+
}
869+
else {
868870
md_array_remove_at(ctx.store_names, idx);
869871
}
870872
}
871873

872-
if (ctx.maybe_new_mds->nelts == 0) goto leave; /* none new */
873-
if (ctx.store_names->nelts == 0) goto leave; /* all new */
874+
if (ctx.maybe_new_mds->nelts == 0) {
875+
/* none new */
876+
goto leave;
877+
}
878+
if (ctx.store_names->nelts == 0) {
879+
/* all new */
880+
for (i = 0; i < ctx.maybe_new_mds->nelts; ++i) {
881+
md = APR_ARRAY_IDX(ctx.maybe_new_mds, i, md_t*);
882+
APR_ARRAY_PUSH(ctx.new_mds, md_t*) = md;
883+
}
884+
goto leave;
885+
}
874886

875887
md_log_perror(MD_LOG_MARK, MD_LOG_DEBUG, 0, p,
876888
"sync MDs, %d potentially new MDs detected, looking for renames among "

src/mod_md.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ static int md_add_cert_files(server_rec *s, apr_pool_t *p,
12621262
s->server_hostname);
12631263
}
12641264
ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, s,
1265-
"host '%s' is covered by a Managed Domaina and "
1265+
"host '%s' is covered by a Managed Domain and "
12661266
"is being provided with %d key/certificate files.",
12671267
s->server_hostname, md_cert_files->nelts);
12681268
apr_array_cat(cert_files, md_cert_files);

0 commit comments

Comments
 (0)