httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Rumph <mike.ru...@oracle.com>
Subject Re: svn commit: r1766129 - in /httpd/httpd/trunk/modules/http2: h2_session.c h2_stream.c
Date Mon, 24 Oct 2016 15:54:58 GMT
Hello Yann,

I have a question in line below.

Thanks,

Mike Rumph

On 10/21/2016 2:05 PM, ylavic@apache.org wrote:
> Author: ylavic
> Date: Fri Oct 21 21:05:39 2016
> New Revision: 1766129
>
> Modified: httpd/httpd/trunk/modules/http2/h2_stream.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_stream.c?rev=1766129&r1=1766128&r2=1766129&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/http2/h2_stream.c (original)
> +++ httpd/httpd/trunk/modules/http2/h2_stream.c Fri Oct 21 21:05:39 2016
> @@ -449,7 +449,7 @@ int h2_stream_is_scheduled(const h2_stre
>   apr_status_t h2_stream_close_input(h2_stream *stream)
>   {
>       conn_rec *c = stream->session->c;
> -    apr_status_t status = APR_SUCCESS;
> +    apr_status_t status = APR_SUCCESS, rv;
>   
>       ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
>                     "h2_stream(%ld-%d): closing input",
> @@ -477,7 +477,8 @@ apr_status_t h2_stream_close_input(h2_st
>       }
>       
>       close_input(stream);
> -    return h2_beam_close(stream->input);
> +    rv = h2_beam_close(stream->input);
> +    return status ? status : rv;
This line seems to depend on the assumption that APR_SUCCESS is coded as 
zero.
Wouldn't it be better to not hard code that assumption?

     return status != APR_SUCCESS ? status : rv;


>   }
>   
>   apr_status_t h2_stream_write_data(h2_stream *stream,
>
>
>


Mime
View raw message