summaryrefslogtreecommitdiffstats
path: root/kbx/keybox-search.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 21:21:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 21:21:03 +0000
commit69349561bf941cc67f1afcbbc115af8dbd624f94 (patch)
tree49d5db9fac516d5de488244d4cffd2e9d74220e7 /kbx/keybox-search.c
parentAdding debian version 2.2.40-3. (diff)
downloadgnupg2-69349561bf941cc67f1afcbbc115af8dbd624f94.tar.xz
gnupg2-69349561bf941cc67f1afcbbc115af8dbd624f94.zip
Merging upstream version 2.2.43.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'kbx/keybox-search.c')
-rw-r--r--kbx/keybox-search.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/kbx/keybox-search.c b/kbx/keybox-search.c
index 263a166..b1aee9e 100644
--- a/kbx/keybox-search.c
+++ b/kbx/keybox-search.c
@@ -777,28 +777,12 @@ release_sn_array (struct sn_array_s *array, size_t size)
}
-/* Helper to open the file. */
-static gpg_error_t
-open_file (KEYBOX_HANDLE hd)
-{
-
- hd->fp = es_fopen (hd->kb->fname, "rb");
- if (!hd->fp)
- {
- hd->error = gpg_error_from_syserror ();
- return hd->error;
- }
-
- return 0;
-}
-
-
/*
-
- The search API
-
-*/
+ *
+ * The search API
+ *
+ */
gpg_error_t
keybox_search_reset (KEYBOX_HANDLE hd)
@@ -822,7 +806,7 @@ keybox_search_reset (KEYBOX_HANDLE hd)
{
/* Ooops. Seek did not work. Close so that the search will
* open the file again. */
- es_fclose (hd->fp);
+ _keybox_ll_close (hd->fp);
hd->fp = NULL;
}
#endif
@@ -901,7 +885,7 @@ keybox_search (KEYBOX_HANDLE hd, KEYBOX_SEARCH_DESC *desc, size_t ndesc,
if (!hd->fp)
{
- rc = open_file (hd);
+ rc = _keybox_ll_open (&hd->fp, hd->kb->fname, 0);
if (rc)
{
xfree (sn_array);
@@ -1310,7 +1294,7 @@ keybox_seek (KEYBOX_HANDLE hd, off_t offset)
return 0;
}
- err = open_file (hd);
+ err = _keybox_ll_open (&hd->fp, hd->kb->fname, 0);
if (err)
return err;
}