newconn->fd1.fd = -1;
newconn->timer = g_timer_new ();
newconn->timeout = 60;
- newconn->tunneled = FALSE;
newconn->auth_method = GST_RTSP_AUTH_NONE;
newconn->username = NULL;
* gst_rtsp_connection_close:
* @conn: a #GstRTSPConnection
*
- * Close the connected @conn.
+ * Close the connected @conn. After this call, the connection is in the same
+ * state as when it was first created.
*
* Returns: #GST_RTSP_OK on success.
*/
REMOVE_POLLFD (conn->fdset, &conn->fd1);
conn->writefd = NULL;
conn->readfd = NULL;
+ conn->tunneled = FALSE;
+ conn->tstate = TUNNEL_STATE_NONE;
+ conn->ctxp = NULL;
+ g_free (conn->username);
+ conn->username = NULL;
+ g_free (conn->passwd);
+ conn->passwd = NULL;
+ gst_rtsp_connection_clear_auth_params (conn);
+ conn->timeout = 60;
+ conn->cseq = 0;
+ conn->session_id[0] = '\0';
return GST_RTSP_OK;
}
res = gst_rtsp_connection_close (conn);
gst_poll_free (conn->fdset);
g_timer_destroy (conn->timer);
- g_free (conn->username);
- g_free (conn->passwd);
- gst_rtsp_connection_clear_auth_params (conn);
gst_rtsp_url_free (conn->url);
g_free (conn);
#ifdef G_OS_WIN32
* Retrieve the URL of the other end of @conn.
*
* Returns: The URL. This value remains valid until the
- * connection is closed.
+ * connection is freed.
*
* Since: 0.10.23
*/