Implemented gsasl driver for authentication.
[exim.git] / src / src / lookups / mysql.c
index 97b9c11390b1d093a86e01fedc8d0ac2d8e0bdfb..9511d2acb411757a084c5273af39523e56645e69 100644 (file)
@@ -1,5 +1,3 @@
-/* $Cambridge: exim/src/src/lookups/mysql.c,v 1.7 2010/03/05 15:59:29 nm4 Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
@@ -413,6 +411,27 @@ while ((c = *s++) != 0)
 return quoted;
 }
 
+
+/*************************************************
+*         Version reporting entry point          *
+*************************************************/
+
+/* See local README for interface description. */
+
+#include "../version.h"
+
+void
+mysql_version_report(FILE *f)
+{
+fprintf(f, "Library version: MySQL: Compile: %s [%s]\n"
+           "                        Runtime: %s\n",
+        MYSQL_SERVER_VERSION, MYSQL_COMPILATION_COMMENT,
+        mysql_get_client_info());
+#ifdef DYNLOOKUP
+fprintf(f, "                        Exim version %s\n", EXIM_VERSION_STR);
+#endif
+}
+
 /* These are the lookup_info blocks for this driver */
 
 static lookup_info mysql_lookup_info = {
@@ -423,7 +442,8 @@ static lookup_info mysql_lookup_info = {
   mysql_find,                    /* find function */
   NULL,                          /* no close function */
   mysql_tidy,                    /* tidy function */
-  mysql_quote                    /* quoting function */
+  mysql_quote,                   /* quoting function */
+  mysql_version_report           /* version reporting */
 };
 
 #ifdef DYNLOOKUP