GNOME Bugzilla – Bug 788523
Label 'no_connection:' not used to handle connection failure in function 'gst_rtsp_server_transfer_connection'
Last modified: 2018-05-07 16:05:35 UTC
In File: rtsp-server.c Function : gst_rtsp_server_transfer_connection Line No. : 1121 A goto statement should have been used to label 'no_connection:' to handle connection failure in case gst_rtsp_client_set_connection (client, conn); returns a false. ----------------- gst_rtsp_server_transfer_connection (GstRTSPServer * server, GSocket * socket, const gchar * ip, gint port, const gchar * initial_buffer) { GstRTSPClient *client = NULL; GstRTSPServerClass *klass; GstRTSPConnection *conn; GstRTSPResult res; klass = GST_RTSP_SERVER_GET_CLASS (server); if (klass->create_client) client = klass->create_client (server); if (client == NULL) goto client_failed; GST_RTSP_CHECK (gst_rtsp_connection_create_from_socket (socket, ip, port, initial_buffer, &conn), no_connection); g_object_unref (socket); /* set connection on the client now */ gst_rtsp_client_set_connection (client, conn); //------------------------------------- //goto no_connection if gst_rtsp_client_set_connection is false //------------------------------- /* manage the client connection */ manage_client (server, client); return TRUE; /* ERRORS */ client_failed: { GST_ERROR_OBJECT (server, "failed to create a client"); g_object_unref (socket); return FALSE; } no_connection: { gchar *str = gst_rtsp_strresult (res); GST_ERROR ("could not create connection from socket %p: %s", socket, str); g_free (str); g_object_unref (socket); return FALSE; } } ------------------------------------
Please make a proper patch, thanks!
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!