On Thu, Oct 17, 2013 at 6:25 PM, Yann Ylavic <[email protected]> wrote:
> On Thu, Oct 17, 2013 at 6:21 PM, Jim Jagielski <[email protected]> wrote: > >> This is uglier than creating a subpool... :) >> > > Possibly ;) but with the pool being destroyed then... > Something like : PROXY_DECLARE(char *) ap_proxy_worker_name(apr_pool_t **p, proxy_worker *worker) { int rv; apr_uri_t uri; if (!(*worker->s->uds_path)) { return worker->s->name; } if (!*p) { /* ugly */ apr_pool_create(p, ap_server_conf->process->pool); if (!*p) { /* something is better than nothing :) */ return worker->s->name; } } return apr_pstrcat(*p, "unix:", worker->s->uds_path, "|", worker->s->name, NULL); } so that the caller caller can : apr_poo_t *p = NULL; char *s = ap_proxy_worker_name(&p, worker); // play with s if (p) { apr_pool_destroy(p); } > > Regards. > >
