*************************************************/
/* Copyright (c) University of Cambridge 1995 - 2015 */
+/* Copyright (c) The Exim Maintainers 2020 */
/* See the file NOTICE for conditions of use and distribution. */
/* Interface to an Oracle database. This code was originally supplied by
/* See local README for interface description. */
static void *
-oracle_open(uschar *filename, uschar **errmsg)
+oracle_open(const uschar * filename, uschar ** errmsg)
{
return (void *)(1); /* Just return something non-null */
}
deferred with a retryable error. */
static int
-oracle_find(void *handle, uschar *filename, uschar *query, int length,
- uschar **result, uschar **errmsg, uint *do_cache)
+oracle_find(void * handle, const uschar * filename, uschar * query, int length,
+ uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts)
{
int sep = 0;
uschar *server;
DEBUG(D_lookup) debug_printf_indent("ORACLE query: %s\n", query);
-while ((server = string_nextinlist(&list, &sep, buffer, sizeof(buffer))) != NULL)
+while ((server = string_nextinlist(&list, &sep, buffer, sizeof(buffer))))
{
BOOL defer_break;
int rc = perform_oracle_search(query, server, result, errmsg, &defer_break);
if (rc != DEFER || defer_break) return rc;
}
-if (oracle_servers == NULL)
+if (!oracle_servers)
*errmsg = "no ORACLE servers defined (oracle_servers option)";
return DEFER;
static lookup_info _lookup_info = {
- US"oracle", /* lookup name */
- lookup_querystyle, /* query-style lookup */
- oracle_open, /* open function */
- NULL, /* check function */
- oracle_find, /* find function */
- NULL, /* no close function */
- oracle_tidy, /* tidy function */
- oracle_quote, /* quoting function */
- oracle_version_report /* version reporting */
+ .name = US"oracle", /* lookup name */
+ .type = lookup_querystyle, /* query-style lookup */
+ .open = oracle_open, /* open function */
+ .check = NULL, /* check function */
+ .find = oracle_find, /* find function */
+ .close = NULL, /* no close function */
+ .tidy = oracle_tidy, /* tidy function */
+ .quote = oracle_quote, /* quoting function */
+ .version_report = oracle_version_report /* version reporting */
};
#ifdef DYNLOOKUP