rtsp: clear the GError for pending connect
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 18 May 2012 07:18:29 +0000 (09:18 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 18 May 2012 07:47:26 +0000 (09:47 +0200)
Clear the GError after g_socket_connect tells us that the connection is pending.
If we don't do this, glib complains when we try to reuse the non-NULL GError
variable a little below.

gst-libs/gst/rtsp/gstrtspconnection.c

index cfa3c00..da9f510 100644 (file)
@@ -426,6 +426,7 @@ do_connect (const gchar * ip, guint16 port, GSocket ** socket_out,
   if (!g_socket_connect (socket, saddr, cancellable, &err)) {
     if (!g_error_matches (err, G_IO_ERROR, G_IO_ERROR_PENDING))
       goto sys_error;
+    g_clear_error (&err);
   } else {
     goto done;
   }