aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-03-26 16:16:44 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-03-26 16:16:44 +0200
commit9348dbda0b0a0471749092632e2675a648ca9e54 (patch)
treed58d9ecb47c7bb7f36a177488f85f1079c000cfb
parentee278a1f44a6f12eddbe11f159f17485a616af98 (diff)
downloadvmod-binlog-9348dbda0b0a0471749092632e2675a648ca9e54.tar.gz
vmod-binlog-9348dbda0b0a0471749092632e2675a648ca9e54.tar.bz2
Dropped support for varnish < 6.0
-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 @@
1Vmod-binlog NEWS -- history of user-visible changes. 2020-03-10 1Vmod-binlog NEWS -- history of user-visible changes. 2020-03-26
2See the end of file for copying conditions. 2See the end of file for copying conditions.
3 3
4Please send Vmod-binlog bug reports to <gray@gnu.org> 4Please send Vmod-binlog bug reports to <gray@gnu.org>
5 5
6Version 2.5.90 (git)
7
8* Dropped support for Varnish versions prior to 6.0
9
10
6Version 2.5, 2020-03-10 11Version 2.5, 2020-03-10
7 12
8* Restore backward compatibility with Varnish versions prior to 6.2. 13* Restore backward compatibility with Varnish versions prior to 6.2.
9 14
10Version 2.4, 2020-03-03 15Version 2.4, 2020-03-03
11 16
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
19arbitrary user-defined data. Such files are convenient for storing 19arbitrary user-defined data. Such files are convenient for storing
20big amounts of information arriving at high rates. 20big amounts of information arriving at high rates.
21 21
22The package provides the module itself and the utilities for listing 22The package provides the module itself and the utilities for listing
23and searching in binary log files. 23and searching in binary log files.
24 24
25The module was tested with Varnish versions 4.1 through 6.0.2. 25The module was tested with Varnish versions 6.0.2 through 6.3.2.
26 26
27* Installation 27* Installation
28 28
29In order to compile the package you need to have the varnishd and varnishapi 29In order to compile the package you need to have the varnishd and varnishapi
30packages installed. 30packages installed.
31 31
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 @@
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details. 12# GNU General Public License for more details.
13# 13#
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>. 15# along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>.
16AC_PREREQ(2.69) 16AC_PREREQ(2.69)
17AC_INIT([vmod-binlog], 2.5, [gray@gnu.org]) 17AC_INIT([vmod-binlog], 2.5.90, [gray@gnu.org])
18AC_CONFIG_AUX_DIR([build-aux]) 18AC_CONFIG_AUX_DIR([build-aux])
19AC_CONFIG_MACRO_DIR([m4]) 19AC_CONFIG_MACRO_DIR([m4])
20AC_CONFIG_SRCDIR(src/binlog.c) 20AC_CONFIG_SRCDIR(src/binlog.c)
21AM_CONFIG_HEADER(config.h) 21AM_CONFIG_HEADER(config.h)
22 22
23AC_SUBST([AC_VMOD_BASENAME],[binlog]) 23AC_SUBST([AC_VMOD_BASENAME],[binlog])
@@ -49,13 +49,13 @@ AC_CONFIG_FILES([libltdl/Makefile])
49AC_SYS_LARGEFILE 49AC_SYS_LARGEFILE
50 50
51# Checks for header files. 51# Checks for header files.
52AC_HEADER_STDC 52AC_HEADER_STDC
53AC_CHECK_HEADERS([sys/stdlib.h]) 53AC_CHECK_HEADERS([sys/stdlib.h])
54 54
55AM_VARNISHAPI([4.1],[6.3.2]) 55AM_VARNISHAPI([6.0],[6.3.2])
56AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR], 56AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR],
57 [Varnish API major version number]) 57 [Varnish API major version number])
58AC_SUBST(BINLOGSEL_MODDIR,'$(libdir)/$(PACKAGE)') 58AC_SUBST(BINLOGSEL_MODDIR,'$(libdir)/$(PACKAGE)')
59 59
60# Initialize the test suite. 60# Initialize the test suite.
61AC_CONFIG_TESTDIR(tests) 61AC_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 @@
25#include <stddef.h> 25#include <stddef.h>
26#include <stdlib.h> 26#include <stdlib.h>
27#include <stdarg.h> 27#include <stdarg.h>
28#include <ctype.h> 28#include <ctype.h>
29#include <time.h> 29#include <time.h>
30#include <string.h> 30#include <string.h>
31#if VARNISHAPI_MAJOR > 5 31
32# include "cache/cache.h" 32#include <cache/cache.h>
33# include "vcl.h" 33#include <vcl.h>
34# include "vcc_if.h" 34#include <vcc_if.h>
35#else
36# include "vcl.h"
37# include "vrt.h"
38# include "vcc_if.h"
39# include "cache/cache.h"
40#endif
41#define WSPTR(s) ((s)->ws)
42 35
43#ifdef VPFX 36#ifdef VPFX
44# define VEVENT(a) VPFX(a) 37# define VEVENT(a) VPFX(a)
45#else 38#else
46/* For compatibility with varnish prior to 6.2 */ 39/* For compatibility with varnish prior to 6.2 */
47# define VEVENT(a) a 40# define VEVENT(a) a
@@ -451,22 +444,22 @@ mkfilename(VRT_CTX, struct binlog_config *conf)
451 time_t ts = time(NULL); 444 time_t ts = time(NULL);
452 size_t u, n; 445 size_t u, n;
453 char *p, *q; 446 char *p, *q;
454 447
455 if (conf->flags & BLF_ROUNDTS) 448 if (conf->flags & BLF_ROUNDTS)
456 ts -= ts % conf->interval; 449 ts -= ts % conf->interval;
457 u = WS_Reserve(WSPTR(ctx), 0); 450 u = WS_ReserveAll(ctx->ws);
458 p = WSPTR(ctx)->f; 451 p = ctx->ws->f;
459 n = strftime(p, u, conf->pattern, gmtime(&ts)); 452 n = strftime(p, u, conf->pattern, gmtime(&ts));
460 if (n == 0) { 453 if (n == 0) {
461 WS_Release(WSPTR(ctx), 0); 454 WS_Release(ctx->ws, 0);
462 return NULL; 455 return NULL;
463 } 456 }
464 q = strdup(p); 457 q = strdup(p);
465 AN(q); 458 AN(q);
466 WS_Release(WSPTR(ctx), 0); 459 WS_Release(ctx->ws, 0);
467 return q; 460 return q;
468} 461}
469 462
470static int 463static int
471mkdir_p(struct binlog_config *conf, char *dir) 464mkdir_p(struct binlog_config *conf, char *dir)
472{ 465{

Return to:

Send suggestions and report system problems to the System administrator.