On 7/3/24 11:09 AM, Yann Ylavic wrote:
> On Wed, Jul 3, 2024 at 11:01 AM Yann Ylavic <ylavic....@gmail.com> wrote:
>>
>> On Wed, Jul 3, 2024 at 10:57 AM Yann Ylavic <ylavic....@gmail.com> wrote:
>>>
>>> On Wed, Jul 3, 2024 at 8:58 AM Ruediger Pluem <rpl...@apache.org> wrote:
>>>>
>>>> On 7/3/24 2:59 AM, Yann Ylavic wrote:
>>>>> On Tue, Jul 2, 2024 at 10:57 AM Ruediger Pluem <rpl...@apache.org> wrote:
>>>>>>
>>>>>> Updated patch.
>>> []
>>>>>> const char *dump = "";
>>>>>> if (APLOG_CS_IS_LEVEL(c, s, APLOG_TRACE7)) {
>>>>>> if (argp != NULL)
>>>>>> @@ -2400,23 +2413,28 @@
>>>>>> dump = "(Oops, no memory buffer?)";
>>>>>> }
>>>>>> ap_log_cserror(APLOG_MARK, APLOG_TRACE4, 0, c, s,
>>>>>> - "%s: %s %ld/%d bytes %s BIO#%pp [mem: %pp] %s",
>>>>>> + "%s: %s %" APR_SIZE_T_FMT "/%" APR_SIZE_T_FMT
>>>>>> + " bytes %s BIO#%pp [mem: %pp] %s",
>>>>>> MODSSL_LIBRARY_NAME,
>>>>>> (cmd == (BIO_CB_WRITE|BIO_CB_RETURN) ? "write" :
>>>>>> "read"),
>>>>>> - (long)rc, argi, (cmd ==
>>>>>> (BIO_CB_WRITE|BIO_CB_RETURN) ? "to" : "from"),
>>>>>> + actual_len, requested_len,
>>>>>> + (cmd == (BIO_CB_WRITE|BIO_CB_RETURN) ? "to" :
>>>>>> "from"),
>>>>>> bio, argp, dump);
>>>>>> if (*dump != '\0' && argp != NULL)
>>
>> Here we could check for APLOG_CS_IS_LEVEL(c, s, APLOG_TRACE7) too, to
>> save the call when ssl_io_data_dump() is a noop anyway.
>
> In this area, maybe we want to move the check for APLOG_TRACE4 from
> the caller of modssl_set_io_callbacks() to the helper itself (which
> knows better). Something like the attached eventually, feel free to
> use since you are touching this code ;)
>
This is a good idea, but I would handle this separately. Feel free to commit.
Regards
Rüdiger