summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2020-03-26 14:16:44 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2020-03-26 14:16:44 (GMT)
commit9348dbda0b0a0471749092632e2675a648ca9e54 (patch) (side-by-side diff)
treed58d9ecb47c7bb7f36a177488f85f1079c000cfb
parentee278a1f44a6f12eddbe11f159f17485a616af98 (diff)
downloadvmod-binlog-9348dbda0b0a0471749092632e2675a648ca9e54.tar.gz
vmod-binlog-9348dbda0b0a0471749092632e2675a648ca9e54.tar.bz2
Dropped support for varnish < 6.0
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--NEWS7
-rw-r--r--README2
m---------acvmod0
-rw-r--r--configure.ac4
-rw-r--r--src/binlog.c23
5 files changed, 17 insertions, 19 deletions
diff --git a/NEWS b/NEWS
index e0437be..96a0c6c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,16 @@
-Vmod-binlog NEWS -- history of user-visible changes. 2020-03-10
+Vmod-binlog NEWS -- history of user-visible changes. 2020-03-26
See the end of file for copying conditions.
Please send Vmod-binlog bug reports to <gray@gnu.org>
+Version 2.5.90 (git)
+
+* Dropped support for Varnish versions prior to 6.0
+
+
Version 2.5, 2020-03-10
* Restore backward compatibility with Varnish versions prior to 6.2.
Version 2.4, 2020-03-03
diff --git a/README b/README
index ff926e0..21da492 100644
--- a/README
+++ b/README
@@ -19,13 +19,13 @@ records. Each record contains a UNIX timestamp in binary form and
arbitrary user-defined data. Such files are convenient for storing
big amounts of information arriving at high rates.
The package provides the module itself and the utilities for listing
and searching in binary log files.
-The module was tested with Varnish versions 4.1 through 6.0.2.
+The module was tested with Varnish versions 6.0.2 through 6.3.2.
* Installation
In order to compile the package you need to have the varnishd and varnishapi
packages installed.
diff --git a/acvmod b/acvmod
-Subproject 5b214e3d72f9e261a37cf31deb41e7f8a61a181
+Subproject b68d558d7aef78eca1417e59ebb0ae38c276e9e
diff --git a/configure.ac b/configure.ac
index 0c91590..6f28517 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,13 +11,13 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.69)
-AC_INIT([vmod-binlog], 2.5, [gray@gnu.org])
+AC_INIT([vmod-binlog], 2.5.90, [gray@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/binlog.c)
AM_CONFIG_HEADER(config.h)
AC_SUBST([AC_VMOD_BASENAME],[binlog])
@@ -49,13 +49,13 @@ AC_CONFIG_FILES([libltdl/Makefile])
AC_SYS_LARGEFILE
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/stdlib.h])
-AM_VARNISHAPI([4.1],[6.3.2])
+AM_VARNISHAPI([6.0],[6.3.2])
AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR],
[Varnish API major version number])
AC_SUBST(BINLOGSEL_MODDIR,'$(libdir)/$(PACKAGE)')
# Initialize the test suite.
AC_CONFIG_TESTDIR(tests)
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.