CVS Commit by andreas: fix disconnect check
require($_SERVER['DOCUMENT_ROOT']."/includes/top_config.php");
?>
CVS Commit by andreas: fix disconnect check
Log Message:
-----------
fix disconnect check
Modified Files:
--------------
pgadmin3/src/ui:
frmMain.cpp (r1.93 -> r1.94)
Index: frmMain.cpp
===================================================================
RCS file: /projects/pgadmin3/src/ui/frmMain.cpp,v
retrieving revision 1.93
retrieving revision 1.94
diff -Lsrc/ui/frmMain.cpp -Lsrc/ui/frmMain.cpp -u -w -r1.93 -r1.94
--- src/ui/frmMain.cpp
+++ src/ui/frmMain.cpp
@@ -549,11 +549,14 @@
while (item)
{
pgDatabase *db=(pgDatabase*)browser->GetItemData(item);
- if (db && db->GetType() == PG_DATABASE && db->GetConnected() && db->connection())
+ if (db && db->GetType() == PG_DATABASE)
{
- if (!db->connection()->IsAlive() && db->connection()->GetStatus() == PGCONN_BROKEN)
+ pgConn *conn=db->GetConnection();
+ if (conn)
{
- db->connection()->Close();
+ if (!conn->IsAlive() && conn->GetStatus() == PGCONN_BROKEN)
+ {
+ conn->Close();
if (!userInformed)
{
wxMessageDialog dlg(this, _("Close database browser? If you abort, the object browser will not show accurate data."),
@@ -572,6 +575,7 @@
}
}
}
+ }
item = browser->GetNextChild(obj->GetId(), cookie3);
}
}
Home |
Main Index |
Thread Index