X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/e6d225ae6e6811d3c88dc201642a2127ff6c11bd..3a2ac12bcabf06f73ef372dfa23e6edead237aa7:/src/src/lookups/cdb.c diff --git a/src/src/lookups/cdb.c b/src/src/lookups/cdb.c index 6e8b88790..ba925dc12 100644 --- a/src/src/lookups/cdb.c +++ b/src/src/lookups/cdb.c @@ -1,5 +1,3 @@ -/* $Cambridge: exim/src/src/lookups/cdb.c,v 1.3 2005/06/27 14:29:44 ph10 Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ @@ -20,6 +18,9 @@ * Changed over to using unsigned chars * Makes use of lf_check_file() for file checking * -------------------------------------------------------------- + * Modified by The Exim Maintainers 2015: + * const propagation + * -------------------------------------------------------------- * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -274,11 +275,11 @@ cdb_check(void *handle, static int cdb_find(void *handle, uschar *filename, - uschar *keystring, + const uschar *keystring, int key_len, uschar **result, uschar **errmsg, - BOOL *do_cache) + uint *do_cache) { struct cdb_state * cdbp = handle; uint32 item_key_len, @@ -435,6 +436,25 @@ struct cdb_state * cdbp = handle; (void)close(cdbp->fileno); } + + +/************************************************* +* Version reporting entry point * +*************************************************/ + +/* See local README for interface description. */ + +#include "../version.h" + +void +cdb_version_report(FILE *f) +{ +#ifdef DYNLOOKUP +fprintf(f, "Library version: CDB: Exim version %s\n", EXIM_VERSION_STR); +#endif +} + + lookup_info cdb_lookup_info = { US"cdb", /* lookup name */ lookup_absfile, /* uses absolute file name */ @@ -443,7 +463,8 @@ lookup_info cdb_lookup_info = { cdb_find, /* find function */ cdb_close, /* close function */ NULL, /* no tidy function */ - NULL /* no quoting function */ + NULL, /* no quoting function */ + cdb_version_report /* version reporting */ }; #ifdef DYNLOOKUP