Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
25e495fd
Commit
25e495fd
authored
Jan 13, 2017
by
Bruno Jesus
Committed by
Alexandre Julliard
Jan 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
odbc32: Improve some tracing.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
239653ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
35 deletions
+50
-35
proxyodbc.c
dlls/odbc32/proxyodbc.c
+50
-35
No files found.
dlls/odbc32/proxyodbc.c
View file @
25e495fd
...
...
@@ -505,8 +505,6 @@ static BOOL ODBC_LoadDriverManager(void)
const
char
*
s
=
getenv
(
"LIB_ODBC_DRIVER_MANAGER"
);
char
error
[
256
];
TRACE
(
"
\n
"
);
#ifdef SONAME_LIBODBC
if
(
!
s
||
!
s
[
0
])
s
=
SONAME_LIBODBC
;
#endif
...
...
@@ -516,6 +514,7 @@ static BOOL ODBC_LoadDriverManager(void)
if
(
dmHandle
!=
NULL
)
{
TRACE
(
"Opened library %s
\n
"
,
s
);
nErrorType
=
ERROR_FREE
;
return
TRUE
;
}
...
...
@@ -675,7 +674,7 @@ static BOOL ODBC_LoadDMFunctions(void)
SQLRETURN
WINAPI
SQLAllocConnect
(
SQLHENV
EnvironmentHandle
,
SQLHDBC
*
ConnectionHandle
)
{
SQLRETURN
ret
;
TRACE
(
"
Env=%p
\n
"
,
EnvironmentHandle
);
TRACE
(
"
(EnvironmentHandle %p)
\n
"
,
EnvironmentHandle
);
if
(
!
pSQLAllocConnect
)
{
...
...
@@ -685,7 +684,7 @@ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionH
}
ret
=
pSQLAllocConnect
(
EnvironmentHandle
,
ConnectionHandle
);
TRACE
(
"Returns
ret=%d, Handle %p
\n
"
,
ret
,
*
ConnectionHandle
);
TRACE
(
"Returns
%d, Handle %p
\n
"
,
ret
,
*
ConnectionHandle
);
return
ret
;
}
...
...
@@ -706,7 +705,7 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle)
}
ret
=
pSQLAllocEnv
(
EnvironmentHandle
);
TRACE
(
"Returns
ret=%d, Env=%p
\n
"
,
ret
,
*
EnvironmentHandle
);
TRACE
(
"Returns
%d, EnvironmentHandle %p
\n
"
,
ret
,
*
EnvironmentHandle
);
return
ret
;
}
...
...
@@ -717,7 +716,7 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle)
SQLRETURN
WINAPI
SQLAllocHandle
(
SQLSMALLINT
HandleType
,
SQLHANDLE
InputHandle
,
SQLHANDLE
*
OutputHandle
)
{
SQLRETURN
ret
;
TRACE
(
"(Type
=%d, Handle=%p)
\n
"
,
HandleType
,
InputHandle
);
TRACE
(
"(Type
%d, Handle %p)
\n
"
,
HandleType
,
InputHandle
);
if
(
!
pSQLAllocHandle
)
{
...
...
@@ -738,7 +737,7 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S
}
ret
=
pSQLAllocHandle
(
HandleType
,
InputHandle
,
OutputHandle
);
TRACE
(
"Returns
ret=%d, Handle=%p
\n
"
,
ret
,
*
OutputHandle
);
TRACE
(
"Returns
%d, Handle %p
\n
"
,
ret
,
*
OutputHandle
);
return
ret
;
}
...
...
@@ -750,7 +749,7 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl
{
SQLRETURN
ret
;
TRACE
(
"(Connection
=%p)
\n
"
,
ConnectionHandle
);
TRACE
(
"(Connection
%p)
\n
"
,
ConnectionHandle
);
if
(
!
pSQLAllocStmt
)
{
...
...
@@ -760,7 +759,7 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl
}
ret
=
pSQLAllocStmt
(
ConnectionHandle
,
StatementHandle
);
TRACE
(
"Returns
ret=%d, Handle=
%p
\n
"
,
ret
,
*
StatementHandle
);
TRACE
(
"Returns
%d, Handle
%p
\n
"
,
ret
,
*
StatementHandle
);
return
ret
;
}
...
...
@@ -851,12 +850,12 @@ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle)
SQLRETURN
WINAPI
SQLCloseCursor
(
SQLHSTMT
StatementHandle
)
{
SQLRETURN
ret
;
TRACE
(
"(Handle
=%p)
\n
"
,
StatementHandle
);
TRACE
(
"(Handle
%p)
\n
"
,
StatementHandle
);
if
(
!
pSQLCloseCursor
)
return
SQL_ERROR
;
ret
=
pSQLCloseCursor
(
StatementHandle
);
TRACE
(
"
returns %d
\n
"
,
ret
);
TRACE
(
"
Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -910,7 +909,7 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle,
ret
=
pSQLConnect
(
ConnectionHandle
,
ServerName
,
NameLength1
,
UserName
,
NameLength2
,
Authentication
,
NameLength3
);
TRACE
(
"
returns %d
\n
"
,
ret
);
TRACE
(
"
Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -938,7 +937,7 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle,
{
SQLRETURN
ret
;
TRACE
(
"
EnvironmentHandle = %p
\n
"
,
EnvironmentHandle
);
TRACE
(
"
(EnvironmentHandle %p)
\n
"
,
EnvironmentHandle
);
if
(
!
pSQLDataSources
)
return
SQL_ERROR
;
...
...
@@ -947,7 +946,7 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle,
if
(
TRACE_ON
(
odbc
))
{
TRACE
(
"
returns:
%d
\t
"
,
ret
);
TRACE
(
"
Returns
%d
\t
"
,
ret
);
if
(
NameLength1
&&
*
NameLength1
>
0
)
TRACE
(
"DataSource = %s,"
,
ServerName
);
if
(
NameLength2
&&
*
NameLength2
>
0
)
...
...
@@ -974,7 +973,7 @@ SQLRETURN WINAPI SQLDataSourcesA(SQLHENV EnvironmentHandle,
BufferLength1
,
NameLength1
,
Description
,
BufferLength2
,
NameLength2
);
if
(
TRACE_ON
(
odbc
))
{
TRACE
(
"
returns:
%d
\t
"
,
ret
);
TRACE
(
"
Returns
%d
\t
"
,
ret
);
if
(
NameLength1
&&
*
NameLength1
>
0
)
TRACE
(
"DataSource = %s,"
,
ServerName
);
if
(
NameLength2
&&
*
NameLength2
>
0
)
...
...
@@ -1008,12 +1007,12 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle,
SQLRETURN
WINAPI
SQLDisconnect
(
SQLHDBC
ConnectionHandle
)
{
SQLRETURN
ret
;
TRACE
(
"(Handle
=
%p)
\n
"
,
ConnectionHandle
);
TRACE
(
"(Handle
%p)
\n
"
,
ConnectionHandle
);
if
(
!
pSQLDisconnect
)
return
SQL_ERROR
;
ret
=
pSQLDisconnect
(
ConnectionHandle
);
TRACE
(
"
returns %d
\n
"
,
ret
);
TRACE
(
"
Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1039,11 +1038,21 @@ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle,
SQLCHAR
*
MessageText
,
SQLSMALLINT
BufferLength
,
SQLSMALLINT
*
TextLength
)
{
TRACE
(
"
\n
"
);
SQLRETURN
ret
;
TRACE
(
"(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, BufferLength %d)
\n
"
,
EnvironmentHandle
,
ConnectionHandle
,
StatementHandle
,
BufferLength
);
if
(
!
pSQLError
)
return
SQL_ERROR
;
return
pSQLError
(
EnvironmentHandle
,
ConnectionHandle
,
StatementHandle
,
Sqlstate
,
NativeError
,
MessageText
,
BufferLength
,
TextLength
);
ret
=
pSQLError
(
EnvironmentHandle
,
ConnectionHandle
,
StatementHandle
,
Sqlstate
,
NativeError
,
MessageText
,
BufferLength
,
TextLength
);
if
(
ret
==
SQL_SUCCESS
)
TRACE
(
"SQLState %s, Error %d, Text %s, Textlen %d
\n
"
,
debugstr_an
((
char
*
)
Sqlstate
,
5
),
*
NativeError
,
debugstr_an
((
char
*
)
MessageText
,
*
TextLength
),
*
TextLength
);
else
TRACE
(
"Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1101,12 +1110,12 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien
SQLRETURN
WINAPI
SQLFreeConnect
(
SQLHDBC
ConnectionHandle
)
{
SQLRETURN
ret
;
TRACE
(
"(Handle
=%p)
\n
"
,
ConnectionHandle
);
TRACE
(
"(Handle
%p)
\n
"
,
ConnectionHandle
);
if
(
!
pSQLFreeConnect
)
return
SQL_ERROR
;
ret
=
pSQLFreeConnect
(
ConnectionHandle
);
TRACE
(
"Returns %d
\n
"
,
ret
);
TRACE
(
"Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1117,12 +1126,12 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle)
SQLRETURN
WINAPI
SQLFreeEnv
(
SQLHENV
EnvironmentHandle
)
{
SQLRETURN
ret
;
TRACE
(
"(Env
=
%p)
\n
"
,
EnvironmentHandle
);
TRACE
(
"(Env
ironmentHandle
%p)
\n
"
,
EnvironmentHandle
);
if
(
!
pSQLFreeEnv
)
return
SQL_ERROR
;
ret
=
pSQLFreeEnv
(
EnvironmentHandle
);
TRACE
(
"Returns %d
\n
"
,
ret
);
TRACE
(
"Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1133,12 +1142,12 @@ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle)
SQLRETURN
WINAPI
SQLFreeHandle
(
SQLSMALLINT
HandleType
,
SQLHANDLE
Handle
)
{
SQLRETURN
ret
;
TRACE
(
"(Type
=%d, Handle=%p)
\n
"
,
HandleType
,
Handle
);
TRACE
(
"(Type
%d, Handle %p)
\n
"
,
HandleType
,
Handle
);
if
(
!
pSQLFreeHandle
)
return
SQL_ERROR
;
ret
=
pSQLFreeHandle
(
HandleType
,
Handle
);
TRACE
(
"Returns %d
\n
"
,
ret
);
TRACE
(
"Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1149,12 +1158,12 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
SQLRETURN
WINAPI
SQLFreeStmt
(
SQLHSTMT
StatementHandle
,
SQLUSMALLINT
Option
)
{
SQLRETURN
ret
;
TRACE
(
"(Handle %p, Option
=%d)
\n
"
,
StatementHandle
,
Option
);
TRACE
(
"(Handle %p, Option
%d)
\n
"
,
StatementHandle
,
Option
);
if
(
!
pSQLFreeStmt
)
return
SQL_ERROR
;
ret
=
pSQLFreeStmt
(
StatementHandle
,
Option
);
TRACE
(
"Returns %d
\n
"
,
ret
);
TRACE
(
"Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1917,7 +1926,7 @@ SQLRETURN WINAPI SQLDrivers(
{
SQLRETURN
ret
;
TRACE
(
"
direction=%d
\n
"
,
fDirection
);
TRACE
(
"
(Direction %d)
\n
"
,
fDirection
);
if
(
!
pSQLDrivers
)
return
SQL_ERROR
;
ret
=
pSQLDrivers
(
henv
,
fDirection
,
szDriverDesc
,
cbDriverDescMax
,
pcbDriverDesc
,
...
...
@@ -1967,11 +1976,16 @@ SQLRETURN WINAPI SQLDriverConnect(
SQLSMALLINT
*
ptr_conn_str_out
,
SQLUSMALLINT
driver_completion
)
{
TRACE
(
"
\n
"
);
SQLRETURN
ret
;
TRACE
(
"(ConnectionString %s, Length %d)
\n
"
,
debugstr_a
((
char
*
)
conn_str_in
),
len_conn_str_in
);
if
(
!
pSQLDriverConnect
)
return
SQL_ERROR
;
ret
urn
pSQLDriverConnect
(
hdbc
,
hwnd
,
conn_str_in
,
len_conn_str_in
,
conn_str_out
,
ret
=
pSQLDriverConnect
(
hdbc
,
hwnd
,
conn_str_in
,
len_conn_str_in
,
conn_str_out
,
conn_str_out_max
,
ptr_conn_str_out
,
driver_completion
);
TRACE
(
"Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -2070,7 +2084,7 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle,
ret
=
pSQLConnectW
(
ConnectionHandle
,
ServerName
,
NameLength1
,
UserName
,
NameLength2
,
Authentication
,
NameLength3
);
TRACE
(
"
returns %d
\n
"
,
ret
);
TRACE
(
"
Returns %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -2344,7 +2358,8 @@ SQLRETURN WINAPI SQLDriverConnectW(
SQLSMALLINT
*
ptr_conn_str_out
,
SQLUSMALLINT
driver_completion
)
{
TRACE
(
"ConnStrIn (%d bytes) --> %s
\n
"
,
len_conn_str_in
,
debugstr_w
(
conn_str_in
));
TRACE
(
"(ConnectionString %s, Length %d)
\n
"
,
debugstr_w
(
conn_str_in
),
len_conn_str_in
);
if
(
!
pSQLDriverConnectW
)
return
SQL_ERROR
;
return
pSQLDriverConnectW
(
hdbc
,
hwnd
,
conn_str_in
,
len_conn_str_in
,
conn_str_out
,
...
...
@@ -2511,7 +2526,7 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle,
if
(
TRACE_ON
(
odbc
))
{
TRACE
(
"
returns:
%d
\t
"
,
ret
);
TRACE
(
"
Returns
%d
\t
"
,
ret
);
if
(
*
NameLength1
>
0
)
TRACE
(
"DataSource = %s,"
,
debugstr_w
(
ServerName
));
if
(
*
NameLength2
>
0
)
...
...
@@ -2658,7 +2673,7 @@ SQLRETURN WINAPI SQLDriversW(
{
SQLRETURN
ret
;
TRACE
(
"
direction=%d
\n
"
,
fDirection
);
TRACE
(
"
(Direction %d)
\n
"
,
fDirection
);
if
(
!
pSQLDriversW
)
return
SQL_ERROR
;
ret
=
pSQLDriversW
(
henv
,
fDirection
,
szDriverDesc
,
cbDriverDescMax
,
pcbDriverDesc
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment