summaryrefslogtreecommitdiff
path: root/ndb/include
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-07-14 18:02:32 +0200
committerunknown <tomas@poseidon.ndb.mysql.com>2005-07-14 18:02:32 +0200
commit66fccd8261f49c8c70b903b6073c4c120f28655a (patch)
treecc2c0bfca39689812ebbbac42ed1d42f690fcae5 /ndb/include
parent96dcb8c20dbce6561a1e025c5c8a86052771f15b (diff)
downloadmariadb-git-66fccd8261f49c8c70b903b6073c4c120f28655a.tar.gz
added debug prints
ndb/include/portlib/NdbTCP.h: added debug prints ndb/include/util/SocketServer.hpp: added debug prints ndb/src/common/mgmcommon/ConfigRetriever.cpp: debug prints ndb/src/common/mgmcommon/IPCConfig.cpp: debug prints ndb/src/common/portlib/NdbMutex.c: debug prints ndb/src/common/portlib/NdbTCP.cpp: debug printout ndb/src/common/portlib/NdbThread.c: debug printout ndb/src/common/transporter/TransporterRegistry.cpp: debug printout ndb/src/common/util/Parser.cpp: debug printout ndb/src/common/util/SocketClient.cpp: debug printout ndb/src/common/util/SocketServer.cpp: debug printout
Diffstat (limited to 'ndb/include')
-rw-r--r--ndb/include/portlib/NdbTCP.h12
-rw-r--r--ndb/include/util/SocketServer.hpp8
2 files changed, 16 insertions, 4 deletions
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/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?