You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rp...@apache.org on 2012/10/29 11:26:11 UTC
svn commit: r1403239 - in /apr/apr-util/branches/1.3.x: ./ CHANGES
buckets/apr_brigade.c
Author: rpluem
Date: Mon Oct 29 10:26:10 2012
New Revision: 1403239
URL: http://svn.apache.org/viewvc?rev=1403239&view=rev
Log:
Merge r1402870 from trunk:
Remove duplicated logic in apr_brigade_puts().
PR: 53740
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>
Reviewed by: rpluem
Modified:
apr/apr-util/branches/1.3.x/ (props changed)
apr/apr-util/branches/1.3.x/CHANGES
apr/apr-util/branches/1.3.x/buckets/apr_brigade.c
Propchange: apr/apr-util/branches/1.3.x/
------------------------------------------------------------------------------
Merged /apr/apr/trunk:r1402870
Modified: apr/apr-util/branches/1.3.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/CHANGES?rev=1403239&r1=1403238&r2=1403239&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/CHANGES [utf-8] (original)
+++ apr/apr-util/branches/1.3.x/CHANGES [utf-8] Mon Oct 29 10:26:10 2012
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with APR-util 1.3.13
+ *) Remove duplicated logic in apr_brigade_puts(). PR 53740. [Christophe
+ Jaillet <christophe jaillet wanadoo fr>]
+
*) Fix a failure of configure to detect ldap_set_rebind_proc(),
encountered on Fedora 15 with gcc 4.6. [Bojan Smojver]
Modified: apr/apr-util/branches/1.3.x/buckets/apr_brigade.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/buckets/apr_brigade.c?rev=1403239&r1=1403238&r2=1403239&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/buckets/apr_brigade.c (original)
+++ apr/apr-util/branches/1.3.x/buckets/apr_brigade.c Mon Oct 29 10:26:10 2012
@@ -591,29 +591,7 @@ APU_DECLARE(apr_status_t) apr_brigade_pu
apr_brigade_flush flush, void *ctx,
const char *str)
{
- apr_size_t len = strlen(str);
- apr_bucket *bkt = APR_BRIGADE_LAST(bb);
- if (!APR_BRIGADE_EMPTY(bb) && APR_BUCKET_IS_HEAP(bkt)) {
- /* If there is enough space available in a heap bucket
- * at the end of the brigade, copy the string directly
- * into the heap bucket
- */
- apr_bucket_heap *h = bkt->data;
- apr_size_t bytes_avail = h->alloc_len - bkt->length;
-
- if (bytes_avail >= len) {
- char *buf = h->base + bkt->start + bkt->length;
- memcpy(buf, str, len);
- bkt->length += len;
- return APR_SUCCESS;
- }
- }
-
- /* If the string could not be copied into an existing heap
- * bucket, delegate the work to apr_brigade_write(), which
- * knows how to grow the brigade
- */
- return apr_brigade_write(bb, flush, ctx, str, len);
+ return apr_brigade_write(bb, flush, ctx, str, strlen(str));
}
APU_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b,
Re: svn commit: r1403239 - in /apr/apr-util/branches/1.3.x: ./ CHANGES
buckets/apr_brigade.c
Posted by Ruediger Pluem <rp...@apache.org>.
Stefan Fritsch wrote:
> On Monday 29 October 2012, rpluem@apache.org wrote:
>> Author: rpluem
>> Date: Mon Oct 29 10:26:10 2012
>> New Revision: 1403239
>>
>> URL: http://svn.apache.org/viewvc?rev=1403239&view=rev
>> Log:
>> Merge r1402870 from trunk:
>>
>> Remove duplicated logic in apr_brigade_puts().
>
> Thanks for backporting the commits. But do we really need to update
> apr-util 1.3 and 1.4, considering that 1.5.1 has been released?
>
httpd 2.2.x currently ships with apr-util 1.4.x and I preferred to do it for 1.3.x in this case as well.
But there is IMHO no must. Maybe we should discuss which version of apr-util should be considered EOL to have
a better guideline for all of us where fixes should be backported and where they don't need to be backported.
Regards
RĂ¼diger
Re: svn commit: r1403239 - in /apr/apr-util/branches/1.3.x: ./ CHANGES buckets/apr_brigade.c
Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Monday 29 October 2012, rpluem@apache.org wrote:
> Author: rpluem
> Date: Mon Oct 29 10:26:10 2012
> New Revision: 1403239
>
> URL: http://svn.apache.org/viewvc?rev=1403239&view=rev
> Log:
> Merge r1402870 from trunk:
>
> Remove duplicated logic in apr_brigade_puts().
Thanks for backporting the commits. But do we really need to update
apr-util 1.3 and 1.4, considering that 1.5.1 has been released?