dovecot: Renamed default_file/group to option_file/group.

dovecot at dovecot.org dovecot at dovecot.org
Tue Jan 1 19:42:53 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/ab81d6801423
changeset: 7081:ab81d6801423
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jan 01 19:42:49 2008 +0200
description:
Renamed default_file/group to option_file/group.

diffstat:

2 files changed, 14 insertions(+), 14 deletions(-)
doc/dovecot-sql-example.conf |    4 ++--
src/lib-sql/driver-mysql.c   |   24 ++++++++++++------------

diffs (63 lines):

diff -r 19bd363bcf5d -r ab81d6801423 doc/dovecot-sql-example.conf
--- a/doc/dovecot-sql-example.conf	Tue Jan 01 19:35:49 2008 +0200
+++ b/doc/dovecot-sql-example.conf	Tue Jan 01 19:42:49 2008 +0200
@@ -42,9 +42,9 @@
 #     ssl_ca, ssl_ca_path - Set either one or both to enable SSL
 #     ssl_cert, ssl_key   - For sending client-side certificates to server
 #     ssl_cipher          - Set minimum allowed cipher security (default: HIGH)
-#     default_file        - Read options from the given file instead of
+#     option_file         - Read options from the given file instead of
 #                           the default my.cnf location
-#     default_group       - Read options from the given group (default: client)
+#     option_group        - Read options from the given group (default: client)
 # 
 #   You can connect to UNIX sockets by using host: host=/var/run/mysql.sock
 #   Note that currently you can't use spaces in parameters.
diff -r 19bd363bcf5d -r ab81d6801423 src/lib-sql/driver-mysql.c
--- a/src/lib-sql/driver-mysql.c	Tue Jan 01 19:35:49 2008 +0200
+++ b/src/lib-sql/driver-mysql.c	Tue Jan 01 19:42:49 2008 +0200
@@ -31,7 +31,7 @@ struct mysql_db {
 	pool_t pool;
 	const char *user, *password, *dbname, *unix_socket;
 	const char *ssl_cert, *ssl_key, *ssl_ca, *ssl_ca_path, *ssl_cipher;
-	const char *def_file, *def_group;
+	const char *option_file, *option_group;
 	unsigned int port, client_flags;
 
 	ARRAY_DEFINE(connections, struct mysql_connection);
@@ -107,13 +107,13 @@ static bool driver_mysql_connect(struct 
 		host = conn->host;
 	}
 
-	if (db->def_file != NULL)
-		mysql_options(conn->mysql, MYSQL_READ_DEFAULT_FILE, db->def_file);
-
-	if (db->def_group != NULL)
-		mysql_options(conn->mysql, MYSQL_READ_DEFAULT_GROUP, db->def_group);
-	else
-		mysql_options(conn->mysql, MYSQL_READ_DEFAULT_GROUP, "client");
+	if (db->option_file != NULL) {
+		mysql_options(conn->mysql, MYSQL_READ_DEFAULT_FILE,
+			      db->option_file);
+	}
+
+	mysql_options(conn->mysql, MYSQL_READ_DEFAULT_GROUP,
+		      db->option_group != NULL ? db->option_group : "client");
 
 	if (!conn->ssl_set && (db->ssl_ca != NULL || db->ssl_ca_path != NULL)) {
 #ifdef HAVE_MYSQL_SSL
@@ -238,10 +238,10 @@ static void driver_mysql_parse_connect_s
 			field = &db->ssl_ca_path;
 		else if (strcmp(name, "ssl_cipher") == 0)
 			field = &db->ssl_cipher;
-		else if (strcmp(name, "default_file") == 0)
-			field = &db->def_file;
-		else if (strcmp(name, "default_group") == 0)
-			field = &db->def_group;
+		else if (strcmp(name, "option_file") == 0)
+			field = &db->option_file;
+		else if (strcmp(name, "option_group") == 0)
+			field = &db->option_group;
 		else
 			i_fatal("mysql: Unknown connect string: %s", name);
 


More information about the dovecot-cvs mailing list