Adjust to VSL changes in varnish-cache

parent 92a4b658
......@@ -127,7 +127,7 @@ errmsg(VRT_CTX, const char *fmt, ...)
VSLbv(ctx->vsl, SLT_VCL_Error, fmt, args);
else
/* Should this ever happen in vcl_fini() ... */
VSL(SLT_VCL_Error, 0, fmt, args);
VSL(SLT_VCL_Error, NO_VXID, fmt, args);
va_end(args);
}
......@@ -166,10 +166,10 @@ gcrypt_logger(void *priv, int level, const char *fmt, va_list args)
lvl = "DEBUG";
break;
default:
VSL(SLT_Error, 0, "Unknown libgcrypt log level %d", level);
VSL(SLT_Error, NO_VXID, "Unknown libgcrypt log level %d", level);
}
VSL(tag, 0, "libgcrypt log message follows (%s):", lvl);
VSLv(tag, 0, fmt, args);
VSL(tag, NO_VXID, "libgcrypt log message follows (%s):", lvl);
VSLv(tag, NO_VXID, fmt, args);
}
static void
......@@ -178,7 +178,7 @@ gcrypt_fatal(void *priv, int err, const char *text)
(void) priv;
if (text == NULL)
text = gpg_strerror(err);
VSL(SLT_Error, 0, "libgcrypt fatal error, code=%d (%s), panic follows",
VSL(SLT_Error, NO_VXID, "libgcrypt fatal error, code=%d (%s), panic follows",
err, text);
AZ(text);
}
......@@ -196,7 +196,7 @@ vmod_event(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
gcry_set_fatalerror_handler(gcrypt_fatal, NULL);
gcrypt_version = gcry_check_version(MIN_GCRYPT_VERSION);
if (gcrypt_version == NULL) {
VSL(SLT_VCL_Error, 0,
VSL(SLT_VCL_Error, NO_VXID,
"libgcrypt initialization failed");
return 1;
}
......@@ -218,7 +218,7 @@ vmod_init(VRT_CTX, VCL_ENUM cmd, VCL_BYTES n)
return;
}
if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) {
VSL(SLT_Debug, 0, "libgcrypt initialization already finished");
VSL(SLT_Debug, NO_VXID, "libgcrypt initialization already finished");
return;
}
......
......@@ -24,6 +24,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef NO_VXID
#define NO_VXID ((struct vxids){0})
#endif
enum padding {
#define PADDING(p) p,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment