[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    Re: svn commit: r1162565 - /httpd/httpd/trunk/modules/http/byterange_filter.c
From:       Jim Jagielski <jim () jaguNET ! com>
Date:       2011-08-29 14:54:00
Message-ID: EC266DE9-028A-4F19-8C6F-29D8EC079727 () jaguNET ! com
[Download RAW message or body]


On Aug 28, 2011, at 1:52 PM, rpluem@apache.org wrote:
> +    *indexes = apr_array_make(r->pool, ranges, sizeof(indexes_t));
> +    merged = apr_array_make(r->pool, ranges, sizeof(char *));
>     while ((cur = ap_getword(r->pool, &range, ','))) {
>         char *dash;
>         char *errp;
> @@ -560,7 +571,7 @@ static int ap_set_byterange(request_rec 
>             new = (char **)apr_array_push(merged);
>             *new = apr_psprintf(r->pool, "%" APR_OFF_T_FMT "-%" APR_OFF_T_FMT,
>                                     ostart, oend);
> -            idx = (indexes_t *)apr_array_push(indexes);
> +            idx = (indexes_t *)apr_array_push(*indexes);
>             idx->start = ostart;
>             idx->end = oend;
>             sum_lengths += oend - ostart + 1;

If we wanted to get really fancy, we could just prealloc the
indexes array, and then then, at the end, create merged from
that…

Maybe an enhancement for trunk, but let's get 2.2 out first I guess !


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic