Hi all,
I've just found a regression in the syslog functionality in v4 std module.
Not sure when/where it emerged.
The log(...) method and the syslog(...) methods where updated to use
workspace. But the implementation is slightly different and the result is
that the syslog method writes an empty string to syslog.
...
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
u = WS_Reserve(ctx->ws, 0);
p = ctx->ws->f;
va_start(ap, fmt);
p = VRT_StringList(p, u, fmt, ap);
va_end(ap);
if (p != NULL)
syslog((int)fac, "%s", p);
WS_Release(ctx->ws, 0);
...
I think it should be:
...
* txt t;*
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
u = WS_Reserve(ctx->ws, 0);
* t.b = ctx->ws->f;*
va_start(ap, fmt);
* t.e = VRT_StringList(t.b, u, fmt, ap);*
va_end(ap);
* if (t.e != NULL) {*
* assert(t.e > t.b);*
* t.e--;*
* syslog((int)fac, "%s", t.b);*
* }*
WS_Release(ctx->ws, 0);
...
Thoughts?
-phil
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev