Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #51 from ali-ince/1.7-connection-id
Browse files Browse the repository at this point in the history
Provide more context about log entries
  • Loading branch information
ali-ince authored Oct 23, 2018
2 parents 65aa2e3 + cdac3ff commit b445976
Show file tree
Hide file tree
Showing 17 changed files with 276 additions and 159 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ project(seabolt
DESCRIPTION "The C Connector library for Neo4j"
LANGUAGES C CXX)

set(PROJECT_VERSION "1.7.0-rc2" CACHE STRING "The version of seabolt being built")
set(SEABOLT_VERSION "1.7.0-rc03" CACHE STRING "The version of seabolt being built")

message(STATUS ${SEABOLT_VERSION})

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(Internals)
Expand Down Expand Up @@ -148,7 +150,7 @@ configure_package_config_file(
)

file(GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${SEABOLT_NAME}.pc
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_PKGCONFIGDIR}/${SEABOLT_NAME}.pc
CONTENT "\
name=${SEABOLT_NAME}\n\
libdir=\${pcfiledir}/${LIBDIR_RELATIVE_PKGCONFIGDIR}\n\
Expand All @@ -164,7 +166,7 @@ Libs.private: $<TARGET_PROPERTY:${SEABOLT_SHARED},INTERFACE_LINK_LIBRARIES>\n\

install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${SEABOLT_NAME}.pc
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_PKGCONFIGDIR}/${SEABOLT_NAME}.pc
DESTINATION ${INSTALL_PKGCONFIGDIR}
COMPONENT dev)

Expand Down
20 changes: 11 additions & 9 deletions cmake/Internals.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ macro(find_openssl_both)
endmacro()

macro(set_version)
if (PROJECT_VERSION MATCHES "^v?([0-9]+).[0-9]+.[0-9]+")
if (SEABOLT_VERSION MATCHES "^v?([0-9]+).[0-9]+.[0-9]+")
set(_VERSION_MAJOR ${CMAKE_MATCH_1})
endif ()

if (PROJECT_VERSION MATCHES "^v?[0-9]+.([0-9]+).[0-9]+")
if (SEABOLT_VERSION MATCHES "^v?[0-9]+.([0-9]+).[0-9]+")
set(_VERSION_MINOR ${CMAKE_MATCH_1})
endif ()

if (PROJECT_VERSION MATCHES "^v?[0-9]+.[0-9]+.([0-9]+)")
if (SEABOLT_VERSION MATCHES "^v?[0-9]+.[0-9]+.([0-9]+)")
set(_VERSION_PATCH ${CMAKE_MATCH_1})
endif ()

if (PROJECT_VERSION MATCHES "^v?[0-9]+.[0-9]+.[0-9]+-([a-zA-Z]+[0-9]+)$")
if (SEABOLT_VERSION MATCHES "^v?[0-9]+.[0-9]+.[0-9]+-([a-zA-Z]+[0-9]+)$")
set(_VERSION_TWEAK ${CMAKE_MATCH_1})
endif ()

Expand All @@ -78,10 +78,11 @@ macro(set_version)
message(FATAL_ERROR "Version ${PROJECT_VERSION} is not a valid semver version value.")
endif ()

set(PROJECT_VERSION_MAJOR ${_VERSION_MAJOR} CACHE STRING "The major version of seabolt being built")
set(PROJECT_VERSION_MINOR ${_VERSION_MINOR} CACHE STRING "The minor version of seabolt being built")
set(PROJECT_VERSION_PATCH ${_VERSION_PATCH} CACHE STRING "The patch version of seabolt being built")
set(PROJECT_VERSION_TWEAK ${_VERSION_TWEAK} CACHE STRING "The tweak version of seabolt being built")
set(PROJECT_VERSION ${SEABOLT_VERSION})
set(PROJECT_VERSION_MAJOR ${_VERSION_MAJOR})
set(PROJECT_VERSION_MINOR ${_VERSION_MINOR})
set(PROJECT_VERSION_PATCH ${_VERSION_PATCH})
set(PROJECT_VERSION_TWEAK ${_VERSION_TWEAK})
endmacro()

macro(set_names)
Expand All @@ -92,6 +93,7 @@ macro(set_names)
endmacro()

macro(configure_rpath)
set(CMAKE_SKIP_RPATH ON)
set(CMAKE_SKIP_RPATH OFF)
set(CMAKE_BUILD_RPATH ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_MACOSX_RPATH ON)
endmacro()
10 changes: 5 additions & 5 deletions src/seabolt/src/address.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ int BoltAddress_resolve(struct BoltAddress* address, struct BoltLog* log)
BoltUtil_mutex_lock(&address->lock);

if (strchr(address->host, ':')==NULL) {
BoltLog_info(log, "Resolving address %s:%s", address->host, address->port);
BoltLog_info(log, "[addr]: Resolving address %s:%s", address->host, address->port);
}
else {
BoltLog_info(log, "Resolving address [%s]:%s", address->host, address->port);
BoltLog_info(log, "[addr]: Resolving address [%s]:%s", address->host, address->port);
}
static struct addrinfo hints;
hints.ai_family = AF_UNSPEC;
Expand Down Expand Up @@ -131,14 +131,14 @@ int BoltAddress_resolve(struct BoltAddress* address, struct BoltLog* log)
}
freeaddrinfo(ai);
if (address->n_resolved_hosts==1) {
BoltLog_info(log, "Host resolved to 1 IP address");
BoltLog_info(log, "[addr]: Host resolved to 1 IP address");
}
else {
BoltLog_info(log, "Host resolved to %d IP addresses", address->n_resolved_hosts);
BoltLog_info(log, "[addr]: Host resolved to %d IP addresses", address->n_resolved_hosts);
}
}
else {
BoltLog_info(log, "Host resolution failed (status %d)", gai_status);
BoltLog_info(log, "[addr]: Host resolution failed (status %d)", gai_status);
}

if (address->n_resolved_hosts>0) {
Expand Down
1 change: 1 addition & 0 deletions src/seabolt/src/config-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@

extern int SSL_CTX_TRUST_INDEX;
extern int SSL_CTX_LOG_INDEX;
extern int SSL_CTX_ID_INDEX;

#endif // USE_OPENSSL

Expand Down
Loading

0 comments on commit b445976

Please sign in to comment.