summaryrefslogtreecommitdiff
path: root/ndb/src/common/portlib
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.(none)>2004-09-17 00:14:40 +0000
committerunknown <tomas@poseidon.(none)>2004-09-17 00:14:40 +0000
commit3bfae53babbaeebbcd49c9b699e6fd350b2dc1f7 (patch)
treebbd0d7b13909518cebe801c3e1c5b102ee9df4c7 /ndb/src/common/portlib
parent38628bca1b08b3f5d97d3e4ec2425e022ed0f501 (diff)
parent254d4e87d04fd0d37183489504b31ee90b05d5f0 (diff)
downloadmariadb-git-3bfae53babbaeebbcd49c9b699e6fd350b2dc1f7.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.(none):/home/tomas/mysql-4.1-ndb-merge ndb/src/common/portlib/NdbTCP.cpp: Auto merged
Diffstat (limited to 'ndb/src/common/portlib')
-rw-r--r--ndb/src/common/portlib/NdbTCP.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/ndb/src/common/portlib/NdbTCP.cpp b/ndb/src/common/portlib/NdbTCP.cpp
index 8448d64222f..a711a586203 100644
--- a/ndb/src/common/portlib/NdbTCP.cpp
+++ b/ndb/src/common/portlib/NdbTCP.cpp
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <ndb_global.h>
#include <NdbMutex.h>
#include <NdbTCP.h>
@@ -27,13 +28,14 @@ static NdbMutex LOCK_gethostbyname = NDB_MUTEX_INITIALIZER;
extern "C"
int
Ndb_getInAddr(struct in_addr * dst, const char *address) {
+ DBUG_ENTER("Ndb_getInAddr");
struct hostent * hostPtr;
NdbMutex_Lock(&LOCK_gethostbyname);
hostPtr = gethostbyname(address);
if (hostPtr != NULL) {
dst->s_addr = ((struct in_addr *) *hostPtr->h_addr_list)->s_addr;
NdbMutex_Unlock(&LOCK_gethostbyname);
- return 0;
+ DBUG_RETURN(0);
}
NdbMutex_Unlock(&LOCK_gethostbyname);
@@ -47,9 +49,11 @@ Ndb_getInAddr(struct in_addr * dst, const char *address) {
#endif
)
{
- return 0;
+ DBUG_RETURN(0);
}
- return -1;
+ DBUG_PRINT("error",("inet_addr(%s) - %d - %s",
+ address, errno, strerror(errno)));
+ DBUG_RETURN(-1);
}
#if 0