rm5248 commented on PR #205:
URL: https://github.com/apache/logging-log4cxx/pull/205#issuecomment-1521014729
This looks good to me.
Note that I had to do the following to get things working properly on Linux
with ODBC:
```
diff --git a/src/main/cpp/odbcappender.cpp b/src/main/cpp/odbcappender.cpp
index 513ca37a..775b89ce 100644
--- a/src/main/cpp/odbcappender.cpp
+++ b/src/main/cpp/odbcappender.cpp
@@ -332,10 +332,14 @@ ODBCAppender::SQLHDBC
ODBCAppender::getConnection(log4cxx::helpers::Pool& p)
}
- SQLWCHAR* wURL, *wUser, *wPwd;
+ SQLWCHAR* wURL, *wUser = nullptr, *wPwd = nullptr;
encode(&wURL, _priv->databaseURL, p);
- encode(&wUser, _priv->databaseUser, p);
- encode(&wPwd, _priv->databasePassword, p);
+ if(_priv->databaseUser.length() > 0){
+ encode(&wUser, _priv->databaseUser, p);
+ }
+ if(_priv->databasePassword.length() > 0){
+ encode(&wPwd, _priv->databasePassword, p);
+ }
ret = SQLConnectW( _priv->connection,
wURL, SQL_NTS,
```
I will continue on my branch as well since it is complimentary to this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]