aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2020-03-03 08:36:17 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2020-03-03 08:36:17 +0200
commit347da6028be9ae8ea1b5ac0a82ad7783780e6782 (patch)
tree890e1fd873761955821f07c78b68888505001b28
parent5b18b9c1e8d0e0ad14937669a931a1a358e65091 (diff)
downloadvmod-dict-347da6028be9ae8ea1b5ac0a82ad7783780e6782.tar.gz
vmod-dict-347da6028be9ae8ea1b5ac0a82ad7783780e6782.tar.bz2
Support for Varnish 6.3.1v1.3
-rw-r--r--NEWS9
-rw-r--r--configure.ac6
-rw-r--r--src/vmod_dict.c4
-rw-r--r--src/vmod_dict.vcc2
4 files changed, 13 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index dc2ba29..a28b8f9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,34 +1,39 @@
1vmod_dict -- history of user-visible changes. 2018-12-10 1vmod_dict -- history of user-visible changes. 2020-03-03
2See the end of file for copying conditions. 2See the end of file for copying conditions.
3 3
4Please send vmod_dict bug reports to <gray@gnu.org> 4Please send vmod_dict bug reports to <gray@gnu.org>
5 5
6Version 1.3, 2020-03-03
7
8* Support for Varnish 6.3.1
9
10
6Version 1.2, 2018-12-10 11Version 1.2, 2018-12-10
7 12
8* Support for Varnish 6.0.2 13* Support for Varnish 6.0.2
9 14
10Version 1.1, 2017-08-10 15Version 1.1, 2017-08-10
11 16
12* Support for Varnish 5.1 17* Support for Varnish 5.1
13 18
14 19
15Version 1.0, 2017-08-06 20Version 1.0, 2017-08-06
16 21
17Initial release 22Initial release
18 23
19========================================================================= 24=========================================================================
20Copyright information: 25Copyright information:
21 26
22Copyright (C) 2017-2018 Sergey Poznyakoff 27Copyright (C) 2017-2020 Sergey Poznyakoff
23 28
24 Permission is granted to anyone to make or distribute verbatim copies 29 Permission is granted to anyone to make or distribute verbatim copies
25 of this document as received, in any medium, provided that the 30 of this document as received, in any medium, provided that the
26 copyright notice and this permission notice are preserved, 31 copyright notice and this permission notice are preserved,
27 thus giving the recipient permission to redistribute in turn. 32 thus giving the recipient permission to redistribute in turn.
28 33
29 Permission is granted to distribute modified versions 34 Permission is granted to distribute modified versions
30 of this document, or of portions of it, 35 of this document, or of portions of it,
31 under the above conditions, provided also that they 36 under the above conditions, provided also that they
32 carry prominent notices stating who last changed them. 37 carry prominent notices stating who last changed them.
33 38
34Local variables: 39Local variables:
diff --git a/configure.ac b/configure.ac
index 1054289..1dc3887 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,30 +1,30 @@
1# This file is part of vmod_dict. 1# This file is part of vmod_dict.
2# Copyright (C) 2017-2018 Sergey Poznyakoff 2# Copyright (C) 2017-2020 Sergey Poznyakoff
3# 3#
4# Vmod_dict is free software; you can redistribute it and/or modify 4# Vmod_dict is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option) 6# the Free Software Foundation; either version 3, or (at your option)
7# any later version. 7# any later version.
8# 8#
9# Vmod_dict is distributed in the hope that it will be useful, 9# Vmod_dict is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# but WITHOUT ANY WARRANTY; without even the implied warranty of
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_dict. If not, see <http://www.gnu.org/licenses/>. 15# along with vmod_dict. If not, see <http://www.gnu.org/licenses/>.
16 16
17AC_PREREQ(2.69) 17AC_PREREQ(2.69)
18AC_INIT([vmod-dict], [1.2], [gray@gnu.org]) 18AC_INIT([vmod-dict], [1.3], [gray@gnu.org])
19AC_CONFIG_AUX_DIR([build-aux]) 19AC_CONFIG_AUX_DIR([build-aux])
20AC_CONFIG_MACRO_DIR([m4]) 20AC_CONFIG_MACRO_DIR([m4])
21AC_CONFIG_SRCDIR(src/vmod_dict.vcc) 21AC_CONFIG_SRCDIR(src/vmod_dict.vcc)
22AM_CONFIG_HEADER(config.h) 22AM_CONFIG_HEADER(config.h)
23 23
24AC_SUBST([AC_VMOD_BASENAME],[dict]) 24AC_SUBST([AC_VMOD_BASENAME],[dict])
25AC_CANONICAL_SYSTEM 25AC_CANONICAL_SYSTEM
26AC_LANG(C) 26AC_LANG(C)
27 27
28AM_INIT_AUTOMAKE([1.14 gnu tar-ustar silent-rules]) 28AM_INIT_AUTOMAKE([1.14 gnu tar-ustar silent-rules])
29AM_SILENT_RULES([yes]) 29AM_SILENT_RULES([yes])
30 30
@@ -36,25 +36,25 @@ if test "x$ac_cv_prog_cc_c99" = xno; then
36fi 36fi
37AC_PROG_CPP 37AC_PROG_CPP
38 38
39AC_PROG_INSTALL 39AC_PROG_INSTALL
40AC_PROG_LIBTOOL 40AC_PROG_LIBTOOL
41AC_PROG_MAKE_SET 41AC_PROG_MAKE_SET
42 42
43# Checks for header files. 43# Checks for header files.
44AC_HEADER_STDC 44AC_HEADER_STDC
45 45
46# Check for functions 46# Check for functions
47 47
48AM_VARNISHAPI([4.1],[6.0.9]) 48AM_VARNISHAPI([4.1],[6.3.1])
49AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR], 49AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR],
50 [Varnish API major version number]) 50 [Varnish API major version number])
51 51
52AC_CONFIG_TESTDIR(tests) 52AC_CONFIG_TESTDIR(tests)
53AC_CONFIG_FILES([tests/Makefile tests/atlocal]) 53AC_CONFIG_FILES([tests/Makefile tests/atlocal])
54AM_MISSING_PROG([AUTOM4TE], [autom4te]) 54AM_MISSING_PROG([AUTOM4TE], [autom4te])
55 55
56AC_CONFIG_FILES([ 56AC_CONFIG_FILES([
57 Makefile 57 Makefile
58 src/Makefile 58 src/Makefile
59]) 59])
60AC_OUTPUT 60AC_OUTPUT
diff --git a/src/vmod_dict.c b/src/vmod_dict.c
index f9114d1..81f35e2 100644
--- a/src/vmod_dict.c
+++ b/src/vmod_dict.c
@@ -1,14 +1,14 @@
1/* This file is part of vmod_dict. 1/* This file is part of vmod_dict.
2 Copyright (C) 2017-2018 Sergey Poznyakoff 2 Copyright (C) 2017-2020 Sergey Poznyakoff
3 3
4 Vmod_dict is free software; you can redistribute it and/or modify 4 Vmod_dict is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option) 6 the Free Software Foundation; either version 3, or (at your option)
7 any later version. 7 any later version.
8 8
9 Vmod_dict is distributed in the hope that it will be useful, 9 Vmod_dict is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
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
@@ -365,25 +365,25 @@ fill_table(void)
365 if (n > cn) cn = n; 365 if (n > cn) cn = n;
366 hash_table[i] = ent; 366 hash_table[i] = ent;
367 } 367 }
368 368
369 if (max_coll <= 0 || cn < max_coll) 369 if (max_coll <= 0 || cn < max_coll)
370 break; 370 break;
371 371
372 next_size = next_size * 2 + 1; 372 next_size = next_size * 2 + 1;
373 } while (next_size < max_hash_size); 373 } while (next_size < max_hash_size);
374} 374}
375 375
376int 376int
377dict_event(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e) 377vmod_dict_event(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
378{ 378{
379 switch (e) { 379 switch (e) {
380 case VCL_EVENT_LOAD: 380 case VCL_EVENT_LOAD:
381 pthread_rwlock_init(&rwlock, NULL); 381 pthread_rwlock_init(&rwlock, NULL);
382 break; 382 break;
383 383
384 case VCL_EVENT_DISCARD: 384 case VCL_EVENT_DISCARD:
385 pthread_rwlock_wrlock(&rwlock); 385 pthread_rwlock_wrlock(&rwlock);
386 while (ent_head) 386 while (ent_head)
387 entry_remove(ent_head); 387 entry_remove(ent_head);
388 free(hash_table); 388 free(hash_table);
389 hash_table = NULL; 389 hash_table = NULL;
diff --git a/src/vmod_dict.vcc b/src/vmod_dict.vcc
index 5e80a02..c5599a0 100644
--- a/src/vmod_dict.vcc
+++ b/src/vmod_dict.vcc
@@ -1,13 +1,13 @@
1$Module dict 3 Dictionary look-up for Varnish Cache 1$Module dict 3 "Dictionary look-up for Varnish Cache"
2 2
3DESCRIPTION 3DESCRIPTION
4=========== 4===========
5 5
6Provides simple key/value dictionary API. The dictionary is kept in 6Provides simple key/value dictionary API. The dictionary is kept in
7a disk file. Each non-empty line in such a file is either a comment 7a disk file. Each non-empty line in such a file is either a comment
8or a pair of keyword - value separated by one or more whitespace characters. 8or a pair of keyword - value separated by one or more whitespace characters.
9Leading and trailing whitespace is discarded. Comments are introduced by a 9Leading and trailing whitespace is discarded. Comments are introduced by a
10hash sign at the beginning of the line. Empty lines and comments are ignored. 10hash sign at the beginning of the line. Empty lines and comments are ignored.
11 11
12$Event dict_event 12$Event dict_event
13$Function VOID ci(BOOL v) 13$Function VOID ci(BOOL v)

Return to:

Send suggestions and report system problems to the System administrator.