diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-04-13 13:36:00 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-04-13 13:36:00 +0000 |
commit | a1b1928af9f0dc6bac68a72976892bfe9609ff4c (patch) | |
tree | e7fb820ca1c56e660a04a4db1ea94a556dd27b8a /usr.sbin/rpki-client | |
parent | 2d3aec5efcb9bf67907ad5ff9e8e42e38e46f116 (diff) |
Before adding a file to the temporary rrdp repo remove it from the
deleted filepath set. A file can only be in one set (deleted or added)
but not on both.
OK benno@
Diffstat (limited to 'usr.sbin/rpki-client')
-rw-r--r-- | usr.sbin/rpki-client/repo.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/rpki-client/repo.c b/usr.sbin/rpki-client/repo.c index a5720ed44f5..981dfab5808 100644 --- a/usr.sbin/rpki-client/repo.c +++ b/usr.sbin/rpki-client/repo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repo.c,v 1.4 2021/04/07 14:19:31 claudio Exp $ */ +/* $OpenBSD: repo.c,v 1.5 2021/04/13 13:35:59 claudio Exp $ */ /* * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> @@ -778,6 +778,10 @@ rrdp_handle_file(size_t id, enum publish_type pt, char *uri, if (pt == PUB_DEL) { filepath_add(&rr->deleted, uri); } else { + fp = filepath_find(&rr->deleted, uri); + if (fp != NULL) + filepath_put(&rr->deleted, fp); + /* add new file to temp dir */ if ((fn = rrdp_filename(rr, uri, 1)) == NULL) return 0; |