1
0
Fork 0

Merge branch 'devel' into ClustUp1

This commit is contained in:
Max Neunhoeffer 2015-12-15 11:59:25 +01:00
commit 413e66b432
6 changed files with 57 additions and 47 deletions

View File

@ -89,6 +89,45 @@ else:
exit 1 exit 1
fi fi
dnl ----------------------------------------------------------------------------
dnl check for special OS like MacOS X or FreeBSD
dnl ----------------------------------------------------------------------------
tr_DARWIN="no"
tr_FREEBSD="no"
tr_ARM="no"
case $target in
*-apple-darwin*)
tr_DARWIN="yes"
;;
*-*-freebsd*)
tr_FREEBSD="yes"
;;
armv7l-*-linux-gnueabihf)
CPPFLAGS="${CPPFLAGS} -O0"
tr_ARM="yes"
tr_ARM7="yes"
;;
armv6l-*-linux-gnueabihf)
dnl ----------------------------------------------------------------------------
dnl special flags for Arm V6 (pi)
dnl ----------------------------------------------------------------------------
CPPFLAGS="${CPPFLAGS} -O0 -DUSE_EABI_HARDFLOAT -march=armv6 -mfloat-abi=hard"
tr_ARM="yes"
tr_ARM6="yes"
;;
esac
AM_CONDITIONAL(ENABLE_DARWIN, test "x$tr_DARWIN" = xyes)
AM_CONDITIONAL(ENABLE_FREEBSD, test "x$tr_FREEBSD" = xyes)
AM_CONDITIONAL(ENABLE_ARM, test "x$tr_ARM" = xyes)
AM_CONDITIONAL(ENABLE_ARMV6, test "x$tr_ARM6" = xyes)
AM_CONDITIONAL(ENABLE_ARMV7, test "x$tr_ARM7" = xyes)
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
dnl checks for compiler and basic settings dnl checks for compiler and basic settings
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
@ -103,8 +142,8 @@ case $target in
enable_static="yes" enable_static="yes"
enable_shared="no" enable_shared="no"
list_cc="[gcc-4 gcc-3 gcc cc]" list_cc="[gcc-5 gcc-4 gcc-3 gcc cc]"
list_cxx="[g++-4 g++-3 g++ cxx]" list_cxx="[g++-5 g++-4 g++-3 g++ cxx]"
;; ;;
@ -128,43 +167,6 @@ AC_PROG_RANLIB
AX_CXX_COMPILE_STDCXX_11(noext, mandatory) AX_CXX_COMPILE_STDCXX_11(noext, mandatory)
AX_CXX_CHECK_UNORDERED_MAP_EMPLACE AX_CXX_CHECK_UNORDERED_MAP_EMPLACE
dnl ----------------------------------------------------------------------------
dnl check for special OS like MacOS X or FreeBSD
dnl ----------------------------------------------------------------------------
tr_DARWIN="no"
tr_FREEBSD="no"
tr_ARM="no"
case $target in
*-apple-darwin*)
tr_DARWIN="yes"
;;
*-*-freebsd*)
tr_FREEBSD="yes"
;;
armv7l-*-linux-gnueabihf)
tr_ARM="yes"
tr_ARM7="yes"
;;
armv6l-*-linux-gnueabihf)
dnl ----------------------------------------------------------------------------
dnl special flags for Arm V6 (pi)
dnl ----------------------------------------------------------------------------
CPPFLAGS="${CPPFLAGS} -DUSE_EABI_HARDFLOAT -march=armv6 -mfloat-abi=hard"
tr_ARM="yes"
tr_ARM6="yes"
;;
esac
AM_CONDITIONAL(ENABLE_DARWIN, test "x$tr_DARWIN" = xyes)
AM_CONDITIONAL(ENABLE_FREEBSD, test "x$tr_FREEBSD" = xyes)
AM_CONDITIONAL(ENABLE_ARM, test "x$tr_ARM" = xyes)
AM_CONDITIONAL(ENABLE_ARMV6, test "x$tr_ARM6" = xyes)
AM_CONDITIONAL(ENABLE_ARMV7, test "x$tr_ARM7" = xyes)
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
dnl bits dnl bits

View File

@ -869,7 +869,7 @@ function complexInternaSuite () {
}, },
testMultipleBlocksResult: function () { testMultipleBlocksResult: function () {
var query = "FOR x IN OUTBOUND @startId @@eCol RETURN x"; var query = "FOR x IN OUTBOUND @startId @@eCol SORT x._key RETURN x";
var amount = 10000; var amount = 10000;
var startId = vn + "/test"; var startId = vn + "/test";
var bindVars = { var bindVars = {

View File

@ -135,15 +135,20 @@ bool ClientConnection::connectSocket () {
if (_endpoint->isConnected()) { if (_endpoint->isConnected()) {
_endpoint->disconnect(); _endpoint->disconnect();
_isConnected = false;
} }
_socket = _endpoint->connect(_connectTimeout, _requestTimeout); _socket = _endpoint->connect(_connectTimeout, _requestTimeout);
if (! TRI_isvalidsocket(_socket)) { if (! TRI_isvalidsocket(_socket)) {
_errorDetails = _endpoint->_errorMessage; _errorDetails = _endpoint->_errorMessage;
_isConnected = false;
return false; return false;
} }
_isConnected = true;
// note: checkSocket will disconnect the socket if the check fails
if (checkSocket()) { if (checkSocket()) {
return _endpoint->isConnected(); return _endpoint->isConnected();
} }

View File

@ -297,10 +297,6 @@ ConnectionManager::SingleServerConnection* ConnectionManager::leaseConnection (s
// finally create the SingleServerConnection // finally create the SingleServerConnection
std::unique_ptr<SingleServerConnection> c(new SingleServerConnection(s, cn.get(), ep.get(), endpoint)); std::unique_ptr<SingleServerConnection> c(new SingleServerConnection(s, cn.get(), ep.get(), endpoint));
if (c == nullptr) {
return nullptr;
}
// Now put it into our administration: // Now put it into our administration:
s->addConnection(c.get()); s->addConnection(c.get());

View File

@ -103,7 +103,7 @@ bool GeneralClientConnection::connect () {
return false; return false;
} }
_isConnected = connectSocket(); connectSocket();
if (! _isConnected) { if (! _isConnected) {
return false; return false;

View File

@ -163,31 +163,37 @@ bool SslClientConnection::connectSocket () {
if (_endpoint->isConnected()) { if (_endpoint->isConnected()) {
disconnectSocket(); disconnectSocket();
_isConnected = false;
} }
_socket = _endpoint->connect(_connectTimeout, _requestTimeout); _socket = _endpoint->connect(_connectTimeout, _requestTimeout);
if (! TRI_isvalidsocket(_socket) || _ctx == nullptr) { if (! TRI_isvalidsocket(_socket) || _ctx == nullptr) {
_errorDetails = _endpoint->_errorMessage; _errorDetails = _endpoint->_errorMessage;
_isConnected = false;
return false; return false;
} }
_isConnected = true;
_ssl = SSL_new(_ctx); _ssl = SSL_new(_ctx);
if (_ssl == nullptr) { if (_ssl == nullptr) {
_errorDetails = std::string("failed to create ssl context"); _errorDetails = std::string("failed to create ssl context");
disconnectSocket(); disconnectSocket();
_isConnected = false;
return false; return false;
} }
if (SSL_set_fd(_ssl, (int) TRI_get_fd_or_handle_of_socket(_socket)) != 1) { if (SSL_set_fd(_ssl, (int) TRI_get_fd_or_handle_of_socket(_socket)) != 1) {
_errorDetails = std::string("SSL: failed to create context ") + _errorDetails = std::string("SSL: failed to create context ") +
ERR_error_string(ERR_get_error(), NULL); ERR_error_string(ERR_get_error(), nullptr);
disconnectSocket(); disconnectSocket();
_isConnected = false;
return false; return false;
} }
SSL_set_verify(_ssl, SSL_VERIFY_NONE, NULL); SSL_set_verify(_ssl, SSL_VERIFY_NONE, nullptr);
ERR_clear_error(); ERR_clear_error();
@ -242,6 +248,7 @@ bool SslClientConnection::connectSocket () {
} }
} }
disconnectSocket(); disconnectSocket();
_isConnected = false;
return false; return false;
} }