changeset 4069:d6c15318e730 HEAD

If connecting with UNIX socket, print the UNIX socket path instead of (null).
author Timo Sirainen <tss@iki.fi>
date Sat, 25 Feb 2006 13:29:05 +0200
parents 1f319d46f0dd
children 71b8faa84ec6
files src/lib-sql/driver-mysql.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-sql/driver-mysql.c	Sat Feb 25 12:58:35 2006 +0200
+++ b/src/lib-sql/driver-mysql.c	Sat Feb 25 13:29:05 2006 +0200
@@ -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;