diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-03-26 16:16:44 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-03-26 16:16:44 +0200 |
commit | 9348dbda0b0a0471749092632e2675a648ca9e54 (patch) | |
tree | d58d9ecb47c7bb7f36a177488f85f1079c000cfb | |
parent | ee278a1f44a6f12eddbe11f159f17485a616af98 (diff) | |
download | vmod-binlog-9348dbda0b0a0471749092632e2675a648ca9e54.tar.gz vmod-binlog-9348dbda0b0a0471749092632e2675a648ca9e54.tar.bz2 |
Dropped support for varnish < 6.0
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | README | 2 | ||||
m--------- | acvmod | 0 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/binlog.c | 23 |
5 files changed, 17 insertions, 19 deletions
@@ -1,11 +1,16 @@ | |||
1 | Vmod-binlog NEWS -- history of user-visible changes. 2020-03-10 | 1 | Vmod-binlog NEWS -- history of user-visible changes. 2020-03-26 |
2 | See the end of file for copying conditions. | 2 | See the end of file for copying conditions. |
3 | 3 | ||
4 | Please send Vmod-binlog bug reports to <gray@gnu.org> | 4 | Please send Vmod-binlog bug reports to <gray@gnu.org> |
5 | 5 | ||
6 | Version 2.5.90 (git) | ||
7 | |||
8 | * Dropped support for Varnish versions prior to 6.0 | ||
9 | |||
10 | |||
6 | Version 2.5, 2020-03-10 | 11 | Version 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 | ||
10 | Version 2.4, 2020-03-03 | 15 | Version 2.4, 2020-03-03 |
11 | 16 | ||
@@ -19,13 +19,13 @@ records. Each record contains a UNIX timestamp in binary form and | |||
19 | arbitrary user-defined data. Such files are convenient for storing | 19 | arbitrary user-defined data. Such files are convenient for storing |
20 | big amounts of information arriving at high rates. | 20 | big amounts of information arriving at high rates. |
21 | 21 | ||
22 | The package provides the module itself and the utilities for listing | 22 | The package provides the module itself and the utilities for listing |
23 | and searching in binary log files. | 23 | and searching in binary log files. |
24 | 24 | ||
25 | The module was tested with Varnish versions 4.1 through 6.0.2. | 25 | The module was tested with Varnish versions 6.0.2 through 6.3.2. |
26 | 26 | ||
27 | * Installation | 27 | * Installation |
28 | 28 | ||
29 | In order to compile the package you need to have the varnishd and varnishapi | 29 | In order to compile the package you need to have the varnishd and varnishapi |
30 | packages installed. | 30 | packages 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/>. |
16 | AC_PREREQ(2.69) | 16 | AC_PREREQ(2.69) |
17 | AC_INIT([vmod-binlog], 2.5, [gray@gnu.org]) | 17 | AC_INIT([vmod-binlog], 2.5.90, [gray@gnu.org]) |
18 | AC_CONFIG_AUX_DIR([build-aux]) | 18 | AC_CONFIG_AUX_DIR([build-aux]) |
19 | AC_CONFIG_MACRO_DIR([m4]) | 19 | AC_CONFIG_MACRO_DIR([m4]) |
20 | AC_CONFIG_SRCDIR(src/binlog.c) | 20 | AC_CONFIG_SRCDIR(src/binlog.c) |
21 | AM_CONFIG_HEADER(config.h) | 21 | AM_CONFIG_HEADER(config.h) |
22 | 22 | ||
23 | AC_SUBST([AC_VMOD_BASENAME],[binlog]) | 23 | AC_SUBST([AC_VMOD_BASENAME],[binlog]) |
@@ -49,13 +49,13 @@ AC_CONFIG_FILES([libltdl/Makefile]) | |||
49 | AC_SYS_LARGEFILE | 49 | AC_SYS_LARGEFILE |
50 | 50 | ||
51 | # Checks for header files. | 51 | # Checks for header files. |
52 | AC_HEADER_STDC | 52 | AC_HEADER_STDC |
53 | AC_CHECK_HEADERS([sys/stdlib.h]) | 53 | AC_CHECK_HEADERS([sys/stdlib.h]) |
54 | 54 | ||
55 | AM_VARNISHAPI([4.1],[6.3.2]) | 55 | AM_VARNISHAPI([6.0],[6.3.2]) |
56 | AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR], | 56 | AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR], |
57 | [Varnish API major version number]) | 57 | [Varnish API major version number]) |
58 | AC_SUBST(BINLOGSEL_MODDIR,'$(libdir)/$(PACKAGE)') | 58 | AC_SUBST(BINLOGSEL_MODDIR,'$(libdir)/$(PACKAGE)') |
59 | 59 | ||
60 | # Initialize the test suite. | 60 | # Initialize the test suite. |
61 | AC_CONFIG_TESTDIR(tests) | 61 | 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 @@ | |||
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 | ||
470 | static int | 463 | static int |
471 | mkdir_p(struct binlog_config *conf, char *dir) | 464 | mkdir_p(struct binlog_config *conf, char *dir) |
472 | { | 465 | { |