aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-03-26 16:26:26 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-03-26 16:26:26 +0200
commit89cb55246d6b820a98933e539b12f54ed2d70e89 (patch)
treeb4db0deb70e652bc398ee000b78a1ad3acee028e
parent1ddd47d953e959358846e5051aacc5aad17e89d9 (diff)
downloadvmod-tbf-89cb55246d6b820a98933e539b12f54ed2d70e89.tar.gz
vmod-tbf-89cb55246d6b820a98933e539b12f54ed2d70e89.tar.bz2
Dropped support for varnish < 6.0
-rw-r--r--NEWS7
m---------acvmod0
-rw-r--r--configure.ac2
-rw-r--r--src/tbf.h14
-rw-r--r--src/time.c8
5 files changed, 14 insertions, 17 deletions
diff --git a/NEWS b/NEWS
index 4984b67..83d6500 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,13 @@
1vmod-tbf -- history of user-visible changes. 2020-03-03 1vmod-tbf -- 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-tbf bug reports to <gray@gnu.org> 4Please send vmod-tbf bug reports to <gray@gnu.org>
5 5
6Version 2.4.90 (git)
7
8* Drop support for Varnish versions prior to 6.0
9
10
6Version 2.4, 2020-03-03 11Version 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/>.
16AC_PREREQ(2.69) 16AC_PREREQ(2.69)
17AC_INIT([vmod-tbf], 2.4, [gray@gnu.org]) 17AC_INIT([vmod-tbf], 2.4.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/vmod_tbf.vcc) 20AC_CONFIG_SRCDIR(src/vmod_tbf.vcc)
diff --git a/src/tbf.h b/src/tbf.h
index 1a851c7..27634fa 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -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)
diff --git a/src/time.c b/src/time.c
index b76a137..203d3bf 100644
--- a/src/time.c
+++ b/src/time.c
@@ -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}

Return to:

Send suggestions and report system problems to the System administrator.