psqlodbc.git / summary / log / commit / refs
commit 44c0112ab652d1948ee13dfdee236ee7c40c0552
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Tue Aug 20 04:46:31 2013 +0000
Oops, used wrong #ifdef for CC_Copy.
CC_Copy is needed if _HANDLE_ENLIST_IN_DTC_ is used, regardless of
CLEANUP_CONN_BEFORE_ISOLATION. That caused compilation on Windows to fail.
connection.c | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/connection.c b/connection.c
index 126d0d57..e452bc90 100644
--- a/connection.c
+++ b/connection.c
@@ -414,21 +414,6 @@ cleanup:
return retrv;
}
-#ifdef CLEANUP_CONN_BEFORE_ISOLATION
-static ConnectionClass *
-CC_Copy(const ConnectionClass *conn)
-{
- ConnectionClass *newconn = CC_alloc();
-
- if (newconn)
- {
- memcpy(newconn, conn, sizeof(ConnectionClass));
- CC_lockinit(newconn);
- }
- return newconn;
-}
-#endif
-
ConnectionClass *
CC_Constructor()
{
@@ -4490,6 +4475,19 @@ PgDtc_lock_cntrl(void *self, BOOL acquire, BOOL bTrial)
return ret;
}
+static ConnectionClass *
+CC_Copy(const ConnectionClass *conn)
+{
+ ConnectionClass *newconn = CC_alloc();
+
+ if (newconn)
+ {
+ memcpy(newconn, conn, sizeof(ConnectionClass));
+ CC_lockinit(newconn);
+ }
+ return newconn;
+}
+
#define CLEANUP_CONN_BEFORE_ISOLATION
DLL_DECLARE void *
PgDtc_isolate(void *self, DWORD option)
[parent: 804cd1033087]