[Rpm-maint] [rpm-software-management/rpm] Add a rpmKeyring iterator (PR #3365)

Panu Matilainen notifications at github.com
Fri Oct 11 06:09:12 UTC 2024


@pmatilai commented on this pull request.



> +	keyring->keys.cbegin(),
+	NULL,
+    };
+}
+
+rpmPubkey rpmKeyringIteratorNext(rpmKeyringIterator iterator)
+{
+    rpmPubkey next = NULL;
+
+    if (!iterator)
+	return NULL;
+
+    while (iterator->iterator != iterator->keyring->keys.end()) {
+	next = iterator->iterator->second;
+	iterator->iterator++;
+	rdlock lock(next->mutex);

I don't think we need this lock - the primary key of something in the keyring is not going to change after creation, no matter what :thinking: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3365#pullrequestreview-2362021191
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3365/review/2362021191 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241010/90a6ff02/attachment.html>


More information about the Rpm-maint mailing list