CVS Commit by dpage: Include the hostname in the connect string for
require($_SERVER['DOCUMENT_ROOT']."/includes/top_config.php");
?>
CVS Commit by dpage: Include the hostname in the connect string for
Log Message:
-----------
Include the hostname in the connect string for Kerberos support, per Magnus Hagander
Modified Files:
--------------
pgadmin3/src/db:
pgConn.cpp (r1.65 -> r1.66)
Index: pgConn.cpp
===================================================================
RCS file: /projects/pgadmin3/src/db/pgConn.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -Lsrc/db/pgConn.cpp -Lsrc/db/pgConn.cpp -u -w -r1.65 -r1.66
--- src/db/pgConn.cpp
+++ src/db/pgConn.cpp
@@ -51,7 +51,7 @@
pgConn::pgConn(const wxString& server, const wxString& database, const wxString& username, const wxString& password, int port, int sslmode, OID oid)
{
wxLogInfo(wxT("Creating pgConn object"));
- wxString msg, hostip;
+ wxString msg, hostip, hostname;
conv = &wxConvLibc;
needColQuoting = false;
@@ -85,7 +85,7 @@
memcpy(&(ipaddr),host->h_addr,host->h_length);
hostip = wxString::FromAscii(inet_ntoa(*((struct in_addr*) host->h_addr_list[0])));
-
+ hostname = server;
}
else
hostip = server;
@@ -94,6 +94,10 @@
// Create the connection string
wxString connstr;
+ if (!hostname.IsEmpty()) {
+ connstr.Append(wxT(" host="));
+ connstr.Append(qtString(hostname));
+ }
if (!server.IsEmpty()) {
connstr.Append(wxT(" hostaddr="));
connstr.Append(qtString(hostip));
Home |
Main Index |
Thread Index