wine-staging/patches/odbc-remove-unixodbc/0014-odbc32-Foward-SQLDisconnect-request-onto-driver.patch
Alistair Leslie-Hughes 14f63f40e7 Updated odbc-remove-unixodbc patchset
Instead of removing unixODBC completely. Creating an wine ODBC driver for unixODBC.
This way native and unixODBC drivers can be used.

This is a WIP.
2024-06-23 17:08:33 +10:00

42 lines
1.2 KiB
Diff

From fc34342d52977928717c0b9f45bff99613461201 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 6 Feb 2023 09:26:57 +1100
Subject: [PATCH] odbc32: Foward SQLDisconnect request onto driver
---
dlls/odbc32/proxyodbc.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index 886fe07efb9..eb274c5da5b 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -574,9 +574,23 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum
*/
SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle)
{
+ struct SQLHDBC_data *connection = ConnectionHandle;
SQLRETURN ret = SQL_ERROR;
- FIXME("(ConnectionHandle %p)\n", ConnectionHandle);
+ TRACE("(ConnectionHandle %p)\n", ConnectionHandle);
+
+ if (connection->type != SQL_HANDLE_DBC)
+ {
+ WARN("Wrong handle type %d\n", connection->type);
+ return SQL_ERROR;
+ }
+
+ if (connection->pSQLDisconnect)
+ {
+ ret = connection->pSQLDisconnect(connection->driver_hdbc);
+ }
+
+ TRACE("ret %d\n", ret);
return ret;
}
--
2.43.0