aboutsummaryrefslogtreecommitdiff
path: root/src/binlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/binlog.c')
-rw-r--r--src/binlog.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/binlog.c b/src/binlog.c
index 512503d..196c3c1 100644
--- a/src/binlog.c
+++ b/src/binlog.c
@@ -25,23 +25,16 @@
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <time.h>
#include <string.h>
-#if VARNISHAPI_MAJOR > 5
-# include "cache/cache.h"
-# include "vcl.h"
-# include "vcc_if.h"
-#else
-# include "vcl.h"
-# include "vrt.h"
-# include "vcc_if.h"
-# include "cache/cache.h"
-#endif
-#define WSPTR(s) ((s)->ws)
+
+#include <cache/cache.h>
+#include <vcl.h>
+#include <vcc_if.h>
#ifdef VPFX
# define VEVENT(a) VPFX(a)
#else
/* For compatibility with varnish prior to 6.2 */
# define VEVENT(a) a
@@ -451,22 +444,22 @@ mkfilename(VRT_CTX, struct binlog_config *conf)
time_t ts = time(NULL);
size_t u, n;
char *p, *q;
if (conf->flags & BLF_ROUNDTS)
ts -= ts % conf->interval;
- u = WS_Reserve(WSPTR(ctx), 0);
- p = WSPTR(ctx)->f;
+ u = WS_ReserveAll(ctx->ws);
+ p = ctx->ws->f;
n = strftime(p, u, conf->pattern, gmtime(&ts));
if (n == 0) {
- WS_Release(WSPTR(ctx), 0);
+ WS_Release(ctx->ws, 0);
return NULL;
}
q = strdup(p);
AN(q);
- WS_Release(WSPTR(ctx), 0);
+ WS_Release(ctx->ws, 0);
return q;
}
static int
mkdir_p(struct binlog_config *conf, char *dir)
{

Return to:

Send suggestions and report system problems to the System administrator.