Skip to content

Feature/legacy api header #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
47f65f7
Adding wrapper functinos for legacy API calls
stephen-dixon Jan 22, 2024
61b140f
adding more wrapper functions to legacy.h and adding extra plugin log…
stephen-dixon Jan 23, 2024
890a296
renaming some uda api functions in headers
stephen-dixon Jan 23, 2024
9920af6
prepending "uda" keyword to all api functions which didn't have it pr…
stephen-dixon Jan 23, 2024
468c793
renaming api functions called in legacy wrappers
stephen-dixon Jan 23, 2024
3595d89
fixing some typos in legacy.h
stephen-dixon Jan 23, 2024
67da79b
adding api functions from errorLog.h to legacy.h
stephen-dixon Jan 23, 2024
298c87d
attempting api renaming
stephen-dixon Jan 23, 2024
6c94a4e
updating references to header file locations for logging.h and errorL…
stephen-dixon Jan 24, 2024
73cf6f1
removing client_flags from api function signatures
stephen-dixon Jan 24, 2024
1d0e2a5
correcting uda error log calls from addIdamError to udaAddError in ap…
stephen-dixon Jan 25, 2024
ea32085
removing references to client flags in client wrappers
stephen-dixon Jan 25, 2024
3e187dd
renaming struct api functions to include uda keyword e.g. udaAddMalloc()
stephen-dixon Jan 25, 2024
cf2eff0
renaming IDAM_PLUGIN_INTERFACE to UDA_PLUGIN_ITERFACE
stephen-dixon Jan 25, 2024
e90c93b
correcting bad replace from reudaSetProperty to udaResetProperty
stephen-dixon Jan 25, 2024
9112b1a
renaming some missed struct functions from e.g. findNTreeFoo to udaFi…
stephen-dixon Jan 25, 2024
65eb45e
fixing some compilation issues
stephen-dixon Jan 25, 2024
d380fda
removing repeated API definition between accAPI and accessors
stephen-dixon Jan 25, 2024
4089dc7
fixing compile errors
stephen-dixon Jan 25, 2024
2f7d61f
successfully compiles on macos
stephen-dixon Jan 25, 2024
a3f5a5c
removing java wrapper from cmake
stephen-dixon Jan 25, 2024
4af76f7
fixing pyuda build and renaming missed init struct api functions
stephen-dixon Jan 26, 2024
0556b96
running clang format
stephen-dixon Jan 26, 2024
91529ce
renaming idam_plugin_interface instances to plugin_interface. reorder…
stephen-dixon Jan 26, 2024
49bcbf2
running clang-format
stephen-dixon Jan 26, 2024
6e66989
reordering windows headers to fix CI build
stephen-dixon Jan 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ option( ENABLE_CAPNP "Enable Cap’n Proto serialisation" OFF )
option( NO_WRAPPERS "Don't build any UDA client wrappers" OFF )
option( NO_CXX_WRAPPER "Don't build C++ wrapper" OFF )
option( NO_PYTHON_WRAPPER "Don't build Python wrapper" OFF )
option( NO_JAVA_WRAPPER "Don't build Java wrapper" OFF )
option( NO_JAVA_WRAPPER "Don't build Java wrapper" ON )
option( NO_IDL_WRAPPER "Don't build IDL wrapper" OFF )
option( FAT_IDL "Build IDL wrapper using fat-client" OFF )

Expand Down
2 changes: 2 additions & 0 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ set( HEADERS
include/udaPutAPI.h
include/udaStructs.h
include/udaTypes.h
include/logging.h
include/errorLog.h
)
install( FILES uda.h ${CMAKE_BINARY_DIR}/source/version.h DESTINATION include/uda )
install( FILES ${HEADERS} DESTINATION include/uda )
Expand Down
22 changes: 11 additions & 11 deletions source/authentication/udaClientSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

# include <client/udaClientHostList.h>
# include <client/updateSelectParms.h>
# include <clientserver/errorLog.h>
# include <logging/logging.h>
# include <include/errorLog.h>
# include <include/logging.h>

static bool g_sslDisabled = true; // Default state is not SSL authentication
static int g_sslProtocol = 0; // The default server host name has the SSL protocol name prefix or
Expand Down Expand Up @@ -523,7 +523,7 @@ int writeUdaClientSSL(void* iohandle, char* buf, int count)
if (rc != count) { // Check the write is complete
err = 999;
UDA_LOG(UDA_LOG_DEBUG, "Incomplete write to socket!\n");
addIdamError(UDA_CODE_ERROR_TYPE, "writeUdaClientSSL", err, "Incomplete write to socket!");
udaAddError(UDA_CODE_ERROR_TYPE, "writeUdaClientSSL", err, "Incomplete write to socket!");
return -1;
}
break;
Expand All @@ -532,7 +532,7 @@ int writeUdaClientSSL(void* iohandle, char* buf, int count)
reportSSLErrorCode(rc);
err = 999;
UDA_LOG(UDA_LOG_DEBUG, "Write to socket failed!\n");
addIdamError(UDA_CODE_ERROR_TYPE, "writeUdaClientSSL", err, "Write to socket failed!");
udaAddError(UDA_CODE_ERROR_TYPE, "writeUdaClientSSL", err, "Write to socket failed!");
# ifndef _WIN32
int fopts = 0;
if ((rc = fcntl(g_sslSocket, F_GETFL, &fopts)) < 0 ||
Expand Down Expand Up @@ -562,15 +562,15 @@ int readUdaClientSSL(void* iohandle, char* buf, int count)

if (rc < 0) { // Error
int serrno = errno;
addIdamError(UDA_SYSTEM_ERROR_TYPE, "readUdaClientSSL", errno, "Socket is Closed!");
udaAddError(UDA_SYSTEM_ERROR_TYPE, "readUdaClientSSL", errno, "Socket is Closed!");
if (serrno == EBADF) {
UDA_LOG(UDA_LOG_DEBUG, "Socket is closed!\n");
} else {
UDA_LOG(UDA_LOG_DEBUG, "Read error - %s\n", strerror(serrno));
}
err = 999;
addIdamError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err,
"Socket is Closed! Data request failed. Restarting connection.");
udaAddError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err,
"Socket is Closed! Data request failed. Restarting connection.");
UDA_LOG(UDA_LOG_DEBUG, "Socket is Closed! Data request failed. Restarting connection.\n");
return -1;
}
Expand Down Expand Up @@ -602,7 +602,7 @@ int readUdaClientSSL(void* iohandle, char* buf, int count)
reportSSLErrorCode(rc);
err = 999;
UDA_LOG(UDA_LOG_DEBUG, "Server socket connection closed!\n");
addIdamError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err, "Server socket connection closed!");
udaAddError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err, "Server socket connection closed!");
return -1;

case SSL_ERROR_WANT_READ: // the operation did not complete, try again
Expand All @@ -613,21 +613,21 @@ int readUdaClientSSL(void* iohandle, char* buf, int count)
reportSSLErrorCode(rc);
err = 999;
UDA_LOG(UDA_LOG_DEBUG, "A read operation failed!\n");
addIdamError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err, "A read operation failed!");
udaAddError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err, "A read operation failed!");
return -1;

case SSL_ERROR_SYSCALL: // some I/O error occured - disconnect?
reportSSLErrorCode(rc);
err = 999;
UDA_LOG(UDA_LOG_DEBUG, "Socket read I/O error!\n");
addIdamError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err, "Socket read I/O error!");
udaAddError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err, "Socket read I/O error!");
return -1;

default: // some other error
reportSSLErrorCode(rc);
err = 999;
UDA_LOG(UDA_LOG_DEBUG, "Read from socket failed!\n");
addIdamError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err, "Read from socket failed!");
udaAddError(UDA_CODE_ERROR_TYPE, "readUdaClientSSL", err, "Read from socket failed!");
# ifndef _WIN32
int fopts = 0;
if ((rc = fcntl(g_sslSocket, F_GETFL, &fopts)) < 0 ||
Expand Down
8 changes: 4 additions & 4 deletions source/authentication/udaServerSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# include <openssl/ssl.h>
# include <openssl/x509.h>

# include <clientserver/errorLog.h>
# include <logging/logging.h>
# include <include/errorLog.h>
# include <include/logging.h>
# include <server/writer.h>

# define VERIFY_DEPTH 4
Expand Down Expand Up @@ -85,7 +85,7 @@ void reportServerSSLErrorCode(int rc)
break;
}
err = 999;
addIdamError(UDA_CODE_ERROR_TYPE, "udaSSL", err, msg);
udaAddError(UDA_CODE_ERROR_TYPE, "udaSSL", err, msg);
UDA_LOG(UDA_LOG_DEBUG, "Error - %s\n", msg);
UDA_LOG(UDA_LOG_DEBUG, "Error - %s\n", ERR_error_string(ERR_get_error(), nullptr));
UDA_LOG(UDA_LOG_DEBUG, "State - %s\n", SSL_state_string(g_ssl));
Expand Down Expand Up @@ -582,4 +582,4 @@ int readUdaServerSSL(void* iohandle, char* buf, int count)
return rc;
}

#endif // SERVERBUILD
#endif // SERVERBUILD
Loading