So I was looking around the code to see how to turn on logging in Serf, and found this in src/common.c:

apr_status_t serf__log_init(serf_context_t *ctx)
{
    log_baton_t *log_baton;

    log_baton = apr_palloc(ctx->pool, sizeof(log_baton_t));
    log_baton->output_list = apr_array_make(ctx->pool, 1,
                                            sizeof(serf_log_output_t *));

    return APR_SUCCESS;
}

As far as  I can see, this function is nothing but one big no-op. It allocates a baton and an array from the context's pool, then throws away the reference to the baton and returns.

Am I blind or is this really doing nothing much at all? Shouldn't it at least put the baton into ctx->config?

-- Brane

Reply via email to