diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-03-26 16:26:26 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-03-26 16:26:26 +0200 |
commit | 89cb55246d6b820a98933e539b12f54ed2d70e89 (patch) | |
tree | b4db0deb70e652bc398ee000b78a1ad3acee028e | |
parent | 1ddd47d953e959358846e5051aacc5aad17e89d9 (diff) | |
download | vmod-tbf-89cb55246d6b820a98933e539b12f54ed2d70e89.tar.gz vmod-tbf-89cb55246d6b820a98933e539b12f54ed2d70e89.tar.bz2 |
Dropped support for varnish < 6.0
-rw-r--r-- | NEWS | 7 | ||||
m--------- | acvmod | 0 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/tbf.h | 14 | ||||
-rw-r--r-- | src/time.c | 8 |
5 files changed, 14 insertions, 17 deletions
@@ -1,8 +1,13 @@ | |||
1 | vmod-tbf -- history of user-visible changes. 2020-03-03 | 1 | vmod-tbf -- 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-tbf bug reports to <gray@gnu.org> | 4 | Please send vmod-tbf bug reports to <gray@gnu.org> |
5 | 5 | ||
6 | Version 2.4.90 (git) | ||
7 | |||
8 | * Drop support for Varnish versions prior to 6.0 | ||
9 | |||
10 | |||
6 | Version 2.4, 2020-03-03 | 11 | Version 2.4, 2020-03-03 |
7 | 12 | ||
8 | * Support for Varnish 6.3.1 | 13 | * Support for Varnish 6.3.1 |
diff --git a/acvmod b/acvmod | |||
Subproject 5b214e3d72f9e261a37cf31deb41e7f8a61a181 | Subproject b68d558d7aef78eca1417e59ebb0ae38c276e9e | ||
diff --git a/configure.ac b/configure.ac index f296b3c..6cda22e 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -14,7 +14,7 @@ | |||
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-tbf. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. |
16 | AC_PREREQ(2.69) | 16 | AC_PREREQ(2.69) |
17 | AC_INIT([vmod-tbf], 2.4, [gray@gnu.org]) | 17 | AC_INIT([vmod-tbf], 2.4.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/vmod_tbf.vcc) | 20 | AC_CONFIG_SRCDIR(src/vmod_tbf.vcc) |
@@ -27,17 +27,9 @@ | |||
27 | #include <unistd.h> | 27 | #include <unistd.h> |
28 | #include "vsha256.h" | 28 | #include "vsha256.h" |
29 | #include "pthread.h" | 29 | #include "pthread.h" |
30 | #if VARNISHAPI_MAJOR > 5 | 30 | #include <cache/cache.h> |
31 | # include <cache/cache.h> | 31 | #include <vcl.h> |
32 | # include <vcl.h> | 32 | #include <vcc_if.h> |
33 | # include <vcc_if.h> | ||
34 | #else | ||
35 | # include <vcl.h> | ||
36 | # include <vrt.h> | ||
37 | # include <vcc_if.h> | ||
38 | # include <cache/cache.h> | ||
39 | #endif | ||
40 | #define WSPTR(s) ((s)->ws) | ||
41 | 33 | ||
42 | #ifdef VPFX | 34 | #ifdef VPFX |
43 | # define VEVENT(a) VPFX(a) | 35 | # define VEVENT(a) VPFX(a) |
@@ -30,15 +30,15 @@ vmod_strftime(VRT_CTX, VCL_STRING format, VCL_INT timestamp) | |||
30 | size_t u, n; | 30 | size_t u, n; |
31 | char *p; | 31 | char *p; |
32 | 32 | ||
33 | u = WS_Reserve(WSPTR(ctx), 0); | 33 | u = WS_ReserveAll(ctx->ws); |
34 | p = WSPTR(ctx)->f; | 34 | p = ctx->ws->f; |
35 | n = strftime(p, u, format, gmtime(&ts)); | 35 | n = strftime(p, u, format, gmtime(&ts)); |
36 | if (n == 0) { | 36 | if (n == 0) { |
37 | WS_Release(WSPTR(ctx), 0); | 37 | WS_Release(ctx->ws, 0); |
38 | return NULL; | 38 | return NULL; |
39 | } | 39 | } |
40 | 40 | ||
41 | WS_Release(WSPTR(ctx), n + 1); | 41 | WS_Release(ctx->ws, n + 1); |
42 | 42 | ||
43 | return p; | 43 | return p; |
44 | } | 44 | } |