diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-01-20 14:40:13 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-01-20 14:40:13 +0200 |
commit | 6f72ce19982bd6f7eb9cfe7c2ebcbc221063401d (patch) | |
tree | 522208d44816d8a8bdd9298d1fe7284dbf9267c4 | |
parent | 741817ac5372c374b52b710dd8a4b0cc463ade99 (diff) | |
download | vmod-tbf-varnish-4.1.tar.gz vmod-tbf-varnish-4.1.tar.bz2 |
Rewrite for varnishapi 4.1varnish-4.1
* NEWS: Update.
* configure.ac: Raise version number to 2.0.90
* src/tbf.c (tbf_init): Replaced with tbf_event
* src/vmod_tbf.vcc: Likewise.
* src/tbf.h: Include errno.h and vcl.h.
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/tbf.c | 9 | ||||
-rw-r--r-- | src/tbf.h | 4 | ||||
-rw-r--r-- | src/vmod_tbf.vcc | 2 |
5 files changed, 17 insertions, 7 deletions
@@ -1,10 +1,15 @@ -vmod-tbf -- history of user-visible changes. 2014-11-13 +vmod-tbf -- history of user-visible changes. 2016-01-20 Copyright (C) 2013-2014 Sergey Poznyakoff See the end of file for copying conditions. Please send vmod-tbf bug reports to <gray@gnu.org> +Version 2.1, (git) + +Support for Varnishapi 4.1 + + Version 2.0, 2014-11-13 Support for VCL 4.0 diff --git a/configure.ac b/configure.ac index 8041a57..58f7633 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. AC_PREREQ(2.69) -AC_INIT([vmod-tbf], 2.0, [gray@gnu.org]) +AC_INIT([vmod-tbf], 2.0.90, [gray@gnu.org]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR(src/vmod_tbf.vcc) @@ -335,10 +335,13 @@ tbf_open_safe(const char *params) } int -tbf_init(struct vmod_priv *priv, const struct VCL_conf *vclconf) +tbf_event(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e) { - VTAILQ_INIT(&keylock_head); - VTAILQ_INIT(&keylock_avail); + if (e == VCL_EVENT_LOAD) { + VTAILQ_INIT(&keylock_head); + VTAILQ_INIT(&keylock_avail); + } + return 0; } void @@ -22,7 +22,9 @@ #include <inttypes.h> #include <sys/stat.h> #include <sys/time.h> -#include "vrt.h" +#include <errno.h> +#include <vcl.h> +#include <vrt.h> #include "vcc_if.h" #include "pthread.h" diff --git a/src/vmod_tbf.vcc b/src/vmod_tbf.vcc index bb03d44..28d1af0 100644 --- a/src/vmod_tbf.vcc +++ b/src/vmod_tbf.vcc @@ -24,7 +24,7 @@ For a detailed documentation, please see vmod-tbf(3) manual page. DESCRIPTION =========== -$Init tbf_init +$Event tbf_event $Function VOID open(STRING, STRING) $Function VOID close() $Function VOID sync() |