diff options
Diffstat (limited to 'ndb/include')
-rw-r--r-- | ndb/include/ndb_version.h.in | 12 | ||||
-rw-r--r-- | ndb/include/portlib/NdbTCP.h | 12 | ||||
-rw-r--r-- | ndb/include/transporter/TransporterRegistry.hpp | 2 | ||||
-rw-r--r-- | ndb/include/util/SocketServer.hpp | 8 | ||||
-rw-r--r-- | ndb/include/util/ndb_opts.h | 2 | ||||
-rw-r--r-- | ndb/include/util/version.h | 3 |
6 files changed, 32 insertions, 7 deletions
diff --git a/ndb/include/ndb_version.h.in b/ndb/include/ndb_version.h.in index d7f43eae40a..826f5124407 100644 --- a/ndb/include/ndb_version.h.in +++ b/ndb/include/ndb_version.h.in @@ -36,8 +36,16 @@ #define MAKE_VERSION(A,B,C) (((A) << 16) | ((B) << 8) | ((C) << 0)) #define NDB_VERSION_D MAKE_VERSION(NDB_VERSION_MAJOR, NDB_VERSION_MINOR, NDB_VERSION_BUILD) - -#define NDB_VERSION_STRING (getVersionString(NDB_VERSION, NDB_VERSION_STATUS)) +#define NDB_VERSION_STRING_BUF_SZ 100 +#ifdef __cplusplus +extern "C" +#else +extern +#endif +char ndb_version_string_buf[NDB_VERSION_STRING_BUF_SZ]; +#define NDB_VERSION_STRING (getVersionString(NDB_VERSION, NDB_VERSION_STATUS, \ + ndb_version_string_buf, \ + sizeof(ndb_version_string_buf))) #define NDB_VERSION ndbGetOwnVersion() diff --git a/ndb/include/portlib/NdbTCP.h b/ndb/include/portlib/NdbTCP.h index 8138a2ef354..308a3833ffd 100644 --- a/ndb/include/portlib/NdbTCP.h +++ b/ndb/include/portlib/NdbTCP.h @@ -31,7 +31,7 @@ #define NDB_NONBLOCK FNDELAY #define NDB_SOCKET_TYPE int #define NDB_INVALID_SOCKET -1 -#define NDB_CLOSE_SOCKET(x) close(x) +#define _NDB_CLOSE_SOCKET(x) close(x) /** * socklen_t not defined in the header files of OSE @@ -52,7 +52,7 @@ typedef int socklen_t; #define EWOULDBLOCK WSAEWOULDBLOCK #define NDB_SOCKET_TYPE SOCKET #define NDB_INVALID_SOCKET INVALID_SOCKET -#define NDB_CLOSE_SOCKET(x) closesocket(x) +#define _NDB_CLOSE_SOCKET(x) closesocket(x) #else @@ -64,7 +64,7 @@ typedef int socklen_t; #define NDB_NONBLOCK O_NONBLOCK #define NDB_SOCKET_TYPE int #define NDB_INVALID_SOCKET -1 -#define NDB_CLOSE_SOCKET(x) ::close(x) +#define _NDB_CLOSE_SOCKET(x) ::close(x) #define InetErrno errno @@ -89,6 +89,12 @@ extern "C" { */ int Ndb_getInAddr(struct in_addr * dst, const char *address); +#ifdef DBUG_OFF +#define NDB_CLOSE_SOCKET(fd) _NDB_CLOSE_SOCKET(fd) +#else +int NDB_CLOSE_SOCKET(int fd); +#endif + #ifdef __cplusplus } #endif diff --git a/ndb/include/transporter/TransporterRegistry.hpp b/ndb/include/transporter/TransporterRegistry.hpp index 8bd1de39ed5..410f3e1dc12 100644 --- a/ndb/include/transporter/TransporterRegistry.hpp +++ b/ndb/include/transporter/TransporterRegistry.hpp @@ -238,6 +238,8 @@ public: }; Vector<Transporter_interface> m_transporter_interface; void add_transporter_interface(const char *interf, unsigned short port); + + struct in_addr get_connect_address(NodeId node_id) const; protected: private: diff --git a/ndb/include/util/SocketServer.hpp b/ndb/include/util/SocketServer.hpp index 9d8af204391..ee2dd31c41f 100644 --- a/ndb/include/util/SocketServer.hpp +++ b/ndb/include/util/SocketServer.hpp @@ -41,7 +41,13 @@ public: protected: friend class SocketServer; friend void* sessionThread_C(void*); - Session(NDB_SOCKET_TYPE sock): m_socket(sock){ m_stop = m_stopped = false;} + Session(NDB_SOCKET_TYPE sock): m_socket(sock) + { + DBUG_ENTER("SocketServer::Session"); + DBUG_PRINT("enter",("NDB_SOCKET: %d", m_socket)); + m_stop = m_stopped = false; + DBUG_VOID_RETURN; + } bool m_stop; // Has the session been ordered to stop? bool m_stopped; // Has the session stopped? diff --git a/ndb/include/util/ndb_opts.h b/ndb/include/util/ndb_opts.h index aa7a02f58ae..ca4ca5eac83 100644 --- a/ndb/include/util/ndb_opts.h +++ b/ndb/include/util/ndb_opts.h @@ -28,6 +28,7 @@ const char *opt_connect_str= 0;\ my_bool opt_ndb_optimized_node_selection +bool opt_endinfo= 0; my_bool opt_ndb_shm; #define OPT_NDB_CONNECTSTRING 'c' @@ -93,6 +94,7 @@ ndb_std_get_one_option(int optid, { DBUG_PUSH(argument); } + opt_endinfo= 1; break; case 'V': ndb_std_print_version(); diff --git a/ndb/include/util/version.h b/ndb/include/util/version.h index 5459e44b818..62dc07d905a 100644 --- a/ndb/include/util/version.h +++ b/ndb/include/util/version.h @@ -30,7 +30,8 @@ extern "C" { Uint32 makeVersion(Uint32 major, Uint32 minor, Uint32 build); - const char* getVersionString(Uint32 version, const char * status); + const char* getVersionString(Uint32 version, const char * status, + char *buf, unsigned sz); void ndbPrintVersion(); Uint32 ndbGetOwnVersion(); |