diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2020-03-03 08:36:17 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2020-03-03 08:36:17 +0200 |
commit | 347da6028be9ae8ea1b5ac0a82ad7783780e6782 (patch) | |
tree | 890e1fd873761955821f07c78b68888505001b28 | |
parent | 5b18b9c1e8d0e0ad14937669a931a1a358e65091 (diff) | |
download | vmod-dict-347da6028be9ae8ea1b5ac0a82ad7783780e6782.tar.gz vmod-dict-347da6028be9ae8ea1b5ac0a82ad7783780e6782.tar.bz2 |
Support for Varnish 6.3.1v1.3
-rw-r--r-- | NEWS | 9 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/vmod_dict.c | 4 | ||||
-rw-r--r-- | src/vmod_dict.vcc | 2 |
4 files changed, 13 insertions, 8 deletions
@@ -1,34 +1,39 @@ | |||
1 | vmod_dict -- history of user-visible changes. 2018-12-10 | 1 | vmod_dict -- history of user-visible changes. 2020-03-03 |
2 | See the end of file for copying conditions. | 2 | See the end of file for copying conditions. |
3 | 3 | ||
4 | Please send vmod_dict bug reports to <gray@gnu.org> | 4 | Please send vmod_dict bug reports to <gray@gnu.org> |
5 | 5 | ||
6 | Version 1.3, 2020-03-03 | ||
7 | |||
8 | * Support for Varnish 6.3.1 | ||
9 | |||
10 | |||
6 | Version 1.2, 2018-12-10 | 11 | Version 1.2, 2018-12-10 |
7 | 12 | ||
8 | * Support for Varnish 6.0.2 | 13 | * Support for Varnish 6.0.2 |
9 | 14 | ||
10 | Version 1.1, 2017-08-10 | 15 | Version 1.1, 2017-08-10 |
11 | 16 | ||
12 | * Support for Varnish 5.1 | 17 | * Support for Varnish 5.1 |
13 | 18 | ||
14 | 19 | ||
15 | Version 1.0, 2017-08-06 | 20 | Version 1.0, 2017-08-06 |
16 | 21 | ||
17 | Initial release | 22 | Initial release |
18 | 23 | ||
19 | ========================================================================= | 24 | ========================================================================= |
20 | Copyright information: | 25 | Copyright information: |
21 | 26 | ||
22 | Copyright (C) 2017-2018 Sergey Poznyakoff | 27 | Copyright (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 | ||
34 | Local variables: | 39 | Local 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 | ||
17 | AC_PREREQ(2.69) | 17 | AC_PREREQ(2.69) |
18 | AC_INIT([vmod-dict], [1.2], [gray@gnu.org]) | 18 | AC_INIT([vmod-dict], [1.3], [gray@gnu.org]) |
19 | AC_CONFIG_AUX_DIR([build-aux]) | 19 | AC_CONFIG_AUX_DIR([build-aux]) |
20 | AC_CONFIG_MACRO_DIR([m4]) | 20 | AC_CONFIG_MACRO_DIR([m4]) |
21 | AC_CONFIG_SRCDIR(src/vmod_dict.vcc) | 21 | AC_CONFIG_SRCDIR(src/vmod_dict.vcc) |
22 | AM_CONFIG_HEADER(config.h) | 22 | AM_CONFIG_HEADER(config.h) |
23 | 23 | ||
24 | AC_SUBST([AC_VMOD_BASENAME],[dict]) | 24 | AC_SUBST([AC_VMOD_BASENAME],[dict]) |
25 | AC_CANONICAL_SYSTEM | 25 | AC_CANONICAL_SYSTEM |
26 | AC_LANG(C) | 26 | AC_LANG(C) |
27 | 27 | ||
28 | AM_INIT_AUTOMAKE([1.14 gnu tar-ustar silent-rules]) | 28 | AM_INIT_AUTOMAKE([1.14 gnu tar-ustar silent-rules]) |
29 | AM_SILENT_RULES([yes]) | 29 | AM_SILENT_RULES([yes]) |
30 | 30 | ||
@@ -36,25 +36,25 @@ if test "x$ac_cv_prog_cc_c99" = xno; then | |||
36 | fi | 36 | fi |
37 | AC_PROG_CPP | 37 | AC_PROG_CPP |
38 | 38 | ||
39 | AC_PROG_INSTALL | 39 | AC_PROG_INSTALL |
40 | AC_PROG_LIBTOOL | 40 | AC_PROG_LIBTOOL |
41 | AC_PROG_MAKE_SET | 41 | AC_PROG_MAKE_SET |
42 | 42 | ||
43 | # Checks for header files. | 43 | # Checks for header files. |
44 | AC_HEADER_STDC | 44 | AC_HEADER_STDC |
45 | 45 | ||
46 | # Check for functions | 46 | # Check for functions |
47 | 47 | ||
48 | AM_VARNISHAPI([4.1],[6.0.9]) | 48 | AM_VARNISHAPI([4.1],[6.3.1]) |
49 | AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR], | 49 | AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR], |
50 | [Varnish API major version number]) | 50 | [Varnish API major version number]) |
51 | 51 | ||
52 | AC_CONFIG_TESTDIR(tests) | 52 | AC_CONFIG_TESTDIR(tests) |
53 | AC_CONFIG_FILES([tests/Makefile tests/atlocal]) | 53 | AC_CONFIG_FILES([tests/Makefile tests/atlocal]) |
54 | AM_MISSING_PROG([AUTOM4TE], [autom4te]) | 54 | AM_MISSING_PROG([AUTOM4TE], [autom4te]) |
55 | 55 | ||
56 | AC_CONFIG_FILES([ | 56 | AC_CONFIG_FILES([ |
57 | Makefile | 57 | Makefile |
58 | src/Makefile | 58 | src/Makefile |
59 | ]) | 59 | ]) |
60 | AC_OUTPUT | 60 | AC_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 | ||
376 | int | 376 | int |
377 | dict_event(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e) | 377 | vmod_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 | ||
3 | DESCRIPTION | 3 | DESCRIPTION |
4 | =========== | 4 | =========== |
5 | 5 | ||
6 | Provides simple key/value dictionary API. The dictionary is kept in | 6 | Provides simple key/value dictionary API. The dictionary is kept in |
7 | a disk file. Each non-empty line in such a file is either a comment | 7 | a disk file. Each non-empty line in such a file is either a comment |
8 | or a pair of keyword - value separated by one or more whitespace characters. | 8 | or a pair of keyword - value separated by one or more whitespace characters. |
9 | Leading and trailing whitespace is discarded. Comments are introduced by a | 9 | Leading and trailing whitespace is discarded. Comments are introduced by a |
10 | hash sign at the beginning of the line. Empty lines and comments are ignored. | 10 | hash 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) |