[vlc-devel] commit: Do not serialize DNS queries on Win32, that's slooow! ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed May 28 18:41:45 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed May 28 19:17:10 2008 +0300| [c0a2676e7c7a2af609afce53b333ddee41f565ee]
Do not serialize DNS queries on Win32, that's slooow!
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c0a2676e7c7a2af609afce53b333ddee41f565ee
---
src/network/getaddrinfo.c | 17 ++---------------
1 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c
index baeefb2..5671123 100644
--- a/src/network/getaddrinfo.c
+++ b/src/network/getaddrinfo.c
@@ -674,8 +674,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
hints.ai_flags &= ~AI_NUMERICHOST;
}
#endif
-#if defined (HAVE_GETADDRINFO)
-# ifdef AI_IDN
+#ifdef AI_IDN
/* Run-time I18n Domain Names support */
hints.ai_flags |= AI_IDN;
int ret = getaddrinfo (psz_node, psz_service, &hints, res);
@@ -684,20 +683,8 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
/* IDN not available: disable and retry without it */
hints.ai_flags &= ~AI_IDN;
-# endif
- return getaddrinfo (psz_node, psz_service, &hints, res);
-#else
- int ret;
- vlc_value_t lock;
-
- var_Create (p_this->p_libvlc, "getaddrinfo_mutex", VLC_VAR_MUTEX);
- var_Get (p_this->p_libvlc, "getaddrinfo_mutex", &lock);
- vlc_mutex_lock (lock.p_address);
-
- ret = getaddrinfo (psz_node, psz_service, &hints, res);
- vlc_mutex_unlock (lock.p_address);
- return ret;
#endif
+ return getaddrinfo (psz_node, psz_service, &hints, res);
}
More information about the vlc-devel
mailing list