summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Marks <nymacro@gmail.com>2005-06-19 13:23:06 +0000
committerAaron Marks <nymacro@gmail.com>2005-06-19 13:23:06 +0000
commit46ccf57109ea187d83017218d4ac8ff36628b8b9 (patch)
tree272f43601c32bd180b714ea862ef88f7631506b5
parent3e698a453f476a9bdcb3306b890af514e966baa1 (diff)
downloadmanaserv-46ccf57109ea187d83017218d4ac8ff36628b8b9.tar.gz
manaserv-46ccf57109ea187d83017218d4ac8ff36628b8b9.tar.bz2
manaserv-46ccf57109ea187d83017218d4ac8ff36628b8b9.tar.xz
manaserv-46ccf57109ea187d83017218d4ac8ff36628b8b9.zip
Removed USE_SQLITE define from configure.ac (not used anywhere anymore)
Fixed problem with PGconn not being cleaned up.
-rw-r--r--configure.ac4
-rw-r--r--src/dal/pqdataprovider.cpp6
2 files changed, 4 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 9713d258..a60a2098 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@ if test "x$with_sqlite" == "xyes"; then
)
# Add define
- SQLITE_CFLAGS=" -DSQLITE_SUPPORT -DUSE_SQLITE"
+ SQLITE_CFLAGS=" -DSQLITE_SUPPORT"
AC_SUBST(SQLITE_CFLAGS)
AC_SUBST(SQLITE_LIBS)
@@ -109,8 +109,6 @@ AC_CONFIG_FILES([Makefile
AC_OUTPUT
-AMDEP=AMDEP_TRUE
-
echo
echo "Building with scripting support: $with_scripting"
echo "Building with SQLite support: $with_sqlite"
diff --git a/src/dal/pqdataprovider.cpp b/src/dal/pqdataprovider.cpp
index e39665ef..b409151c 100644
--- a/src/dal/pqdataprovider.cpp
+++ b/src/dal/pqdataprovider.cpp
@@ -74,9 +74,9 @@ PqDataProvider::connect(const std::string& dbName,
if (PQstatus(mDb) != CONNECTION_OK)
{
- // TODO: Postge needs to be cleaned up after throwing the exception
- // PQfinish(mDb);
- throw DbConnectionFailure(PQerrorMessage(mDb));
+ std::string error = PQerrorMessage(mDb);
+ PQfinish(mDb);
+ throw DbConnectionFailure(error);
}
mIsConnected = true;