Skip to content
Commit 1d3d77f0 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1534895, r1534896, r1534914 from trunk:

rotatelogs: Use apr_psprintf() with %pm instead of a constant length buffer for
errors.

* support/rotatelogs.c
  (post_rotate, doRotate): Switch to using apr_psprintf() with %pm.

Suggested by: rpluem


rotatelogs: Remove another use of a consant length buffer for errors.

* support/rotatelogs.c
  (doRotate): Use apr_psprintf() and %pm.  Move the destruction of the pool
    after we're done with the error message so the error string stays allocated
    long enough.


rotatelogs: Remove last constant length error buffer.

* support/rotatelogs.c
  (ERRMSGSZ): Remove.
  (rotate_status): Remove errbuff member.
  (truncate_and_write_error): Accept the error message as an argument.
  (doRotate): Shift the pool destruction slightly later and use it to generate
    the error message to pass truncate_and_write_error().
  (main): In case of write errors create a pool to generate the error message,
    since the other pools available may never been freed.  Adjust to pass
    message directly to truncate_and_write_error().

Submitted by: breser
Reviewed by: rjung, ylavic, jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1828739 13f79535-47bb-0310-9956-ffa450edef68
parent 2bcf3961
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment