[pulseaudio-discuss] [PATCH 2/2] rtsp_client: set disconnect state call cb when on_connection fails
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Fri Feb 7 07:43:54 PST 2014
On Wed, 2014-02-05 at 00:59 +0100, Alexander Couzens wrote:
> Fix an abort in rtsp_exec() when connection was refused because the
> failure wasn't reported back nor the state set.
>
> Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
> ---
> src/modules/rtp/rtsp_client.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/modules/rtp/rtsp_client.c b/src/modules/rtp/rtsp_client.c
> index 5343b3c..5d5fed7 100644
> --- a/src/modules/rtp/rtsp_client.c
> +++ b/src/modules/rtp/rtsp_client.c
> @@ -294,6 +294,8 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
>
> if (!io) {
> pa_log("Connection failed: %s", pa_cstrerror(errno));
> + c->state = STATE_DISCONNECTED;
> + c->callback(c, c->state, c->response_headers, c->userdata);
As far as I can see, it doesn't make sense to pass c->response_headers
here, because the connection was never established, so there can't be
any response headers.
--
Tanu
More information about the pulseaudio-discuss
mailing list