[asterisk-commits] pabelanger: branch 1.4 r320393 - /branches/1.4/cdr/cdr_pgsql.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 21 00:09:35 CDT 2011


Author: pabelanger
Date: Sat May 21 00:09:09 2011
New Revision: 320393

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=320393
Log:
Solaris compatibility fixes

Modified:
    branches/1.4/cdr/cdr_pgsql.c

Modified: branches/1.4/cdr/cdr_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/cdr/cdr_pgsql.c?view=diff&rev=320393&r1=320392&r2=320393
==============================================================================
--- branches/1.4/cdr/cdr_pgsql.c (original)
+++ branches/1.4/cdr/cdr_pgsql.c Sat May 21 00:09:09 2011
@@ -86,7 +86,11 @@
 		if (PQstatus(conn) != CONNECTION_BAD) {
 			connected = 1;
 			if (PQsetClientEncoding(conn, encoding)) {
+#ifdef HAVE_PGSQL_pg_encoding_to_char
 				ast_log(LOG_WARNING, "Failed to set encoding to '%s'.  Encoding set to default '%s'\n", encoding, pg_encoding_to_char(PQclientEncoding(conn)));
+#else
+				ast_log(LOG_WARNING, "Failed to set encoding to '%s'.  Encoding set to default.\n", encoding);
+#endif
 			}
 		} else {
 			pgerror = PQerrorMessage(conn);
@@ -298,7 +302,11 @@
 			ast_log(LOG_DEBUG, "Successfully connected to PostgreSQL database.\n");
 		connected = 1;
 		if (PQsetClientEncoding(conn, encoding)) {
+#ifdef HAVE_PGSQL_pg_encoding_to_char
 			ast_log(LOG_WARNING, "Failed to set encoding to '%s'.  Encoding set to default '%s'\n", encoding, pg_encoding_to_char(PQclientEncoding(conn)));
+#else
+			ast_log(LOG_WARNING, "Failed to set encoding to '%s'.  Encoding set to default.\n", encoding);
+#endif
 		}
 	} else {
 		pgerror = PQerrorMessage(conn);




More information about the asterisk-commits mailing list