[0.10] gst-plugins-base: rtspconnection: make hostname lookup more thread-safe

Tim Müller tpm at kemper.freedesktop.org
Sun Jan 8 06:18:37 PST 2012


Module: gst-plugins-base
Branch: 0.10
Commit: 4450bc04d20dadd41f7613d55905af96e2f26477
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=4450bc04d20dadd41f7613d55905af96e2f26477

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Sat Jan  7 20:12:17 2012 +0000

rtspconnection: make hostname lookup more thread-safe

Don't write IP number string to return into a static
array which is shared amongst all threads (note: of
course a copy is returned).

https://bugzilla.gnome.org/show_bug.cgi?id=666711

---

 gst-libs/gst/rtsp/gstrtspconnection.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c
index 5fcfa25..c7b0f32 100644
--- a/gst-libs/gst/rtsp/gstrtspconnection.c
+++ b/gst-libs/gst/rtsp/gstrtspconnection.c
@@ -458,7 +458,7 @@ wrong_family:
 static gchar *
 do_resolve (const gchar * host)
 {
-  static gchar ip[INET6_ADDRSTRLEN];
+  gchar ip[INET6_ADDRSTRLEN];
   struct addrinfo *aires, hints;
   struct addrinfo *ai;
   gint aierr;



More information about the gstreamer-commits mailing list