Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7081:ab81d6801423 HEAD
Renamed default_file/group to option_file/group.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 01 Jan 2008 19:42:49 +0200 |
parents | 19bd363bcf5d |
children | ce15433c6212 |
files | doc/dovecot-sql-example.conf src/lib-sql/driver-mysql.c |
diffstat | 2 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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 @@ 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 @@ host = conn->host; } - if (db->def_file != NULL) - mysql_options(conn->mysql, MYSQL_READ_DEFAULT_FILE, db->def_file); + if (db->option_file != NULL) { + mysql_options(conn->mysql, MYSQL_READ_DEFAULT_FILE, + db->option_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"); + 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 @@ 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);