Logging: add I= element to transport-defer lines. Bug 2675
[exim.git] / src / src / lookups / lmdb.c
index 2976cfac5be591283face64fab8980d9a3884d79..d9cf25d548eac36f8416224731c3af47d2bbeb1b 100644 (file)
@@ -2,12 +2,13 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 2016 - 2018*/
+/* Copyright (c) University of Cambridge 2016 - 2018 */
+/* Copyright (c) The Exim Maintainers 2020 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include "../exim.h"
 
-#ifdef EXPERIMENTAL_LMDB
+#ifdef LOOKUP_LMDB
 
 #include <lmdb.h>
 
@@ -23,7 +24,7 @@ MDB_dbi db_dbi;
 *************************************************/
 
 static void *
-lmdb_open(uschar * filename, uschar ** errmsg)
+lmdb_open(const uschar * filename, uschar ** errmsg)
 {
 MDB_env * db_env = NULL;
 Lmdbstrct * lmdb_p;
@@ -74,9 +75,9 @@ bad:
 *************************************************/
 
 static int
-lmdb_find(void * handle, uschar * filename,
+lmdb_find(void * handle, const uschar * filename,
     const uschar * keystring, int length, uschar ** result, uschar ** errmsg,
-    uint * do_cache)
+    uint * do_cache, const uschar * opts)
 {
 int ret;
 MDB_val dbkey, data;
@@ -139,15 +140,15 @@ fprintf(f, "                        Exim version %s\n", EXIM_VERSION_STR);
 }
 
 static lookup_info lmdb_lookup_info = {
-  US"lmdb",                     /* lookup name */
-  lookup_absfile,               /* query-style lookup */
-  lmdb_open,                    /* open function */
-  NULL,                         /* no check function */
-  lmdb_find,                    /* find function */
-  lmdb_close,                   /* close function */
-  NULL,                         /* tidy function */
-  NULL,                         /* quoting function */
-  lmdb_version_report           /* version reporting */
+  .name = US"lmdb",                    /* lookup name */
+  .type = lookup_absfile,              /* query-style lookup */
+  .open = lmdb_open,                   /* open function */
+  .check = NULL,                       /* no check function */
+  .find = lmdb_find,                   /* find function */
+  .close = lmdb_close,                 /* close function */
+  .tidy = NULL,                                /* tidy function */
+  .quote = NULL,                       /* quoting function */
+  .version_report = lmdb_version_report           /* version reporting */
 };
 
 #ifdef DYNLOOKUP
@@ -157,4 +158,4 @@ static lookup_info lmdb_lookup_info = {
 static lookup_info *_lookup_list[] = { &lmdb_lookup_info };
 lookup_module_info lmdb_lookup_module_info = { LOOKUP_MODULE_INFO_MAGIC, _lookup_list, 1 };
 
-#endif /* EXPERIMENTAL_LMDB */
+#endif /* LOOKUP_LMDB */