mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
e957c99b14
|
@ -1066,6 +1066,7 @@ bool TRI_EqualJsonJson (TRI_json_t* left, TRI_json_t* right) {
|
|||
assert(false);
|
||||
}
|
||||
}
|
||||
return false; // stops the vc++ compiler from complaining
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1380,7 +1380,7 @@ char* TRI_UnescapeUtf8StringZ (TRI_memory_zone_t* zone, char const* in, size_t i
|
|||
|
||||
// we might have wasted some space if the unescaped string is shorter than the
|
||||
// escaped one. this is the case if the string contained escaped characters
|
||||
if (*outLength < (ptr - in)) {
|
||||
if (((ptr - in) > 0) && (*outLength < (size_t)(ptr - in))) {
|
||||
// result string is shorter than original string
|
||||
qtr = TRI_Allocate(zone, *outLength + 1, false);
|
||||
|
||||
|
|
|
@ -27,11 +27,7 @@
|
|||
|
||||
#include "Endpoint.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
#include "BasicsC/socket-utils.h"
|
||||
|
||||
#include "Basics/StringUtils.h"
|
||||
#include "Basics/FileUtils.h"
|
||||
#include "Logger/Logger.h"
|
||||
|
@ -81,7 +77,7 @@ Endpoint::Endpoint (const Endpoint::Type type,
|
|||
const Endpoint::DomainType domainType,
|
||||
const Endpoint::Protocol protocol,
|
||||
const Endpoint::Encryption encryption,
|
||||
const string& specification) :
|
||||
const std::string& specification) :
|
||||
_connected(false),
|
||||
_socket(0),
|
||||
_type(type),
|
||||
|
@ -115,7 +111,7 @@ Endpoint::~Endpoint () {
|
|||
/// @brief create a client endpoint object from a string value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Endpoint* Endpoint::clientFactory (const string& specification) {
|
||||
Endpoint* Endpoint::clientFactory (const std::string& specification) {
|
||||
return Endpoint::factory(ENDPOINT_CLIENT, specification);
|
||||
}
|
||||
|
||||
|
@ -123,7 +119,7 @@ Endpoint* Endpoint::clientFactory (const string& specification) {
|
|||
/// @brief create a server endpoint object from a string value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Endpoint* Endpoint::serverFactory (const string& specification) {
|
||||
Endpoint* Endpoint::serverFactory (const std::string& specification) {
|
||||
return Endpoint::factory(ENDPOINT_SERVER, specification);
|
||||
}
|
||||
|
||||
|
@ -132,7 +128,7 @@ Endpoint* Endpoint::serverFactory (const string& specification) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Endpoint* Endpoint::factory (const Endpoint::Type type,
|
||||
const string& specification) {
|
||||
const std::string& specification) {
|
||||
if (specification.size() < 7) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -477,8 +473,8 @@ EndpointIp::EndpointIp (const Endpoint::Type type,
|
|||
const Endpoint::DomainType domainType,
|
||||
const Endpoint::Protocol protocol,
|
||||
const Endpoint::Encryption encryption,
|
||||
string const& specification,
|
||||
string const& host,
|
||||
const std::string& specification,
|
||||
const std::string& host,
|
||||
const uint16_t port) :
|
||||
Endpoint(type, domainType, protocol, encryption, specification), _host(host), _port(port) {
|
||||
|
||||
|
|
|
@ -31,16 +31,22 @@
|
|||
#include <Basics/Common.h>
|
||||
#include <Basics/StringUtils.h>
|
||||
|
||||
|
||||
|
||||
#ifdef TRI_HAVE_LINUX_SOCKETS
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
#ifdef TRI_HAVE_LINUX_SOCKETS
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TRI_HAVE_WINSOCK2_H
|
||||
#endif
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- Endpoint
|
||||
|
@ -129,7 +135,7 @@ namespace triagens {
|
|||
const DomainType,
|
||||
const Protocol,
|
||||
const Encryption,
|
||||
const string&);
|
||||
const std::string&);
|
||||
|
||||
public:
|
||||
|
||||
|
@ -158,20 +164,20 @@ namespace triagens {
|
|||
/// @brief creates a server endpoint from a string value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static Endpoint* serverFactory (const string&);
|
||||
static Endpoint* serverFactory (const std::string&);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief creates a client endpoint from a string value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static Endpoint* clientFactory (const string&);
|
||||
static Endpoint* clientFactory (const std::string&);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief creates an endpoint from a string value
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static Endpoint* factory (const Type type,
|
||||
const string&);
|
||||
const std::string&);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief compare two endpoints
|
||||
|
@ -259,7 +265,7 @@ namespace triagens {
|
|||
/// @brief get the original endpoint specification
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
string getSpecification () const {
|
||||
std::string getSpecification () const {
|
||||
return _specification;
|
||||
}
|
||||
|
||||
|
@ -279,13 +285,13 @@ namespace triagens {
|
|||
/// @brief get host name
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
virtual string getHost () const = 0;
|
||||
virtual std::string getHost () const = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief get address
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
virtual string getHostString () const = 0;
|
||||
virtual std::string getHostString () const = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
|
@ -342,7 +348,7 @@ namespace triagens {
|
|||
/// @brief original endpoint specification
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
string _specification;
|
||||
std::string _specification;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
|
|
Loading…
Reference in New Issue