rtspconnection: make hostname lookup more thread-safe
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 7 Jan 2012 20:12:17 +0000 (20:12 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 7 Jan 2012 20:16:41 +0000 (20:16 +0000)
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

index 5fcfa25..c7b0f32 100644 (file)
@@ -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;