[dovecot-cvs] dovecot/src/lib-sql driver-mysql.c,1.15,1.16

cras at dovecot.org cras at dovecot.org
Sat Feb 25 13:29:08 EET 2006


Update of /var/lib/cvs/dovecot/src/lib-sql
In directory talvi:/tmp/cvs-serv8481

Modified Files:
	driver-mysql.c 
Log Message:
If connecting with UNIX socket, print the UNIX socket path instead of
(null).



Index: driver-mysql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-sql/driver-mysql.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- driver-mysql.c	26 Jan 2006 23:00:11 -0000	1.15
+++ driver-mysql.c	25 Feb 2006 11:29:05 -0000	1.16
@@ -128,11 +128,12 @@
 
 		i_error("mysql: Connect failed to %s (%s): %s - "
 			"waiting for %u seconds before retry",
-			host, db->dbname, mysql_error(conn->mysql),
-			conn->connect_delay);
+			host != NULL ? host : unix_socket, db->dbname,
+			mysql_error(conn->mysql), conn->connect_delay);
 		return FALSE;
 	} else {
-		i_info("mysql: Connected to %s%s (%s)", host,
+		i_info("mysql: Connected to %s%s (%s)",
+		       host != NULL ? host : unix_socket,
 		       conn->ssl_set ? " using SSL" : "", db->dbname);
 
 		conn->connect_failure_count = 0;



More information about the dovecot-cvs mailing list