]> granicus.if.org Git - apache/commit
Merge r1534895, r1534896, r1534914 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 9 Apr 2018 15:37:44 +0000 (15:37 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 9 Apr 2018 15:37:44 +0000 (15:37 +0000)
commit2a4c6d8942d2ec90fe5ca555d2af71434bbc001b
treebcee658da6b6ba67f123c55a386d6d5c3a7a570c
parenta71d8fea48fd248a69e38718bba49d64d53a0512
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
STATUS
support/rotatelogs.c