From: <n-...@us...> - 2011-08-25 17:48:54
|
Revision: 5472 http://gfarm.svn.sourceforge.net/gfarm/?rev=5472&view=rev Author: n-soda Date: 2011-08-25 17:48:47 +0000 (Thu, 25 Aug 2011) Log Message: ----------- fix a mistake in r4035 and r4036: before this change, the code for "configure --without-mtsafe-netdb" had been always used. i.e. multiple simultaneous calls of getaddrinfo() had been serialized. Revision Links: -------------- http://gfarm.svn.sourceforge.net/gfarm/?rev=4035&view=rev http://gfarm.svn.sourceforge.net/gfarm/?rev=4036&view=rev Modified Paths: -------------- gfarm_v2/trunk/lib/libgfarm/gfutil/gfnetdb.c Modified: gfarm_v2/trunk/lib/libgfarm/gfutil/gfnetdb.c =================================================================== --- gfarm_v2/trunk/lib/libgfarm/gfutil/gfnetdb.c 2011-08-25 17:41:46 UTC (rev 5471) +++ gfarm_v2/trunk/lib/libgfarm/gfutil/gfnetdb.c 2011-08-25 17:48:47 UTC (rev 5472) @@ -2,6 +2,8 @@ #include <stddef.h> #include <netdb.h> +#include <gfarm/gfarm_config.h> + #include "thrsubr.h" #include "gfnetdb.h" @@ -18,9 +20,10 @@ struct addrinfo **res) { int rv; + +#ifndef HAVE_MTSAFE_NETDB static const char diag[] = "gfarm_getaddrinfo"; -#ifndef HAVE_MTSAFE_NETDB gfarm_mutex_lock(&netdb_mutex, diag, mutex_name); #endif rv = getaddrinfo(hostname, servname, hints, res); @@ -33,9 +36,9 @@ void gfarm_freeaddrinfo(struct addrinfo *ai) { +#ifndef HAVE_MTSAFE_NETDB static const char diag[] = "gfarm_freeaddrinfo"; -#ifndef HAVE_MTSAFE_NETDB gfarm_mutex_lock(&netdb_mutex, diag, mutex_name); #endif freeaddrinfo(ai); @@ -50,9 +53,9 @@ size_t servlen, int flags) { int rv; +#ifndef HAVE_MTSAFE_NETDB static const char diag[] = "gfarm_getnameinfo"; -#ifndef HAVE_MTSAFE_NETDB gfarm_mutex_lock(&netdb_mutex, diag, mutex_name); #endif rv = getnameinfo(sa, salen, host, hostlen, serv, servlen, flags); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |