diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | NEWS | 11 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | git2chg.awk | 2 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/auth.c | 2 | ||||
-rw-r--r-- | src/ban.c | 6 | ||||
-rw-r--r-- | src/betab.c | 5 | ||||
-rw-r--r-- | src/varnish-mib.8 | 2 | ||||
-rw-r--r-- | src/varnish_mib.mib2c | 14 | ||||
-rw-r--r-- | src/vcli.c | 2 |
12 files changed, 29 insertions, 25 deletions
diff --git a/Makefile.am b/Makefile.am index 9f585f9..0334f01 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -1,5 +1,5 @@ | |||
1 | # This file is part of varnish-mib -*- automake -*- | 1 | # This file is part of varnish-mib -*- automake -*- |
2 | # Copyright (C) 2014 Sergey Poznyakoff | 2 | # Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | # | 3 | # |
4 | # varnish-mib is free software; you can redistribute it and/or modify | 4 | # varnish-mib 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 |
@@ -1,9 +1,14 @@ | |||
1 | Varnish-mib NEWS -- history of user-visible changes. 2014-11-28 | 1 | Varnish-mib NEWS -- history of user-visible changes. 2015-02-02 |
2 | Copyright (C) 2014 Sergey Poznyakoff | 2 | Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | See the end of file for copying conditions. | 3 | See the end of file for copying conditions. |
4 | 4 | ||
5 | Please send Varnish-mib bug reports to <gray@gnu.org> | 5 | Please send Varnish-mib bug reports to <gray@gnu.org> |
6 | 6 | ||
7 | Version 1.0.90 (Git) | ||
8 | |||
9 | * Don't exit if unable to open Varnish memory file | ||
10 | |||
11 | |||
7 | Version 1.0, 2014-11-28 | 12 | Version 1.0, 2014-11-28 |
8 | 13 | ||
9 | Initial release. | 14 | Initial release. |
@@ -11,7 +16,7 @@ Initial release. | |||
11 | 16 | ||
12 | * Copyright information: | 17 | * Copyright information: |
13 | 18 | ||
14 | Copyright (C) 2014 Sergey Poznyakoff | 19 | Copyright (C) 2014-2015 Sergey Poznyakoff |
15 | 20 | ||
16 | Permission is granted to anyone to make or distribute verbatim copies | 21 | Permission is granted to anyone to make or distribute verbatim copies |
17 | of this document as received, in any medium, provided that the | 22 | of this document as received, in any medium, provided that the |
@@ -1,5 +1,5 @@ | |||
1 | Varnish-mib README | 1 | Varnish-mib README |
2 | Copyright (C) 2014 Sergey Poznyakoff | 2 | Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | See the end of file for copying conditions. | 3 | See the end of file for copying conditions. |
4 | 4 | ||
5 | * Introduction | 5 | * Introduction |
diff --git a/configure.ac b/configure.ac index 9b4d998..b5d6636 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,5 +1,5 @@ | |||
1 | # This file is part of Varnish-mib -*- autoconf -*- | 1 | # This file is part of Varnish-mib -*- autoconf -*- |
2 | # Copyright (C) 2014 Sergey Poznyakoff | 2 | # Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | # | 3 | # |
4 | # Varnish-mib is free software; you can redistribute it and/or modify | 4 | # Varnish-mib 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 |
@@ -15,7 +15,7 @@ | |||
15 | # along with Varnish-mib. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with Varnish-mib. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | AC_PREREQ(2.69) | 17 | AC_PREREQ(2.69) |
18 | AC_INIT([varnish-mib], 1.0, [gray@gnu.org]) | 18 | AC_INIT([varnish-mib], 1.0.90, [gray@gnu.org]) |
19 | AC_CONFIG_SRCDIR(src/varnish_mib.mib2c) | 19 | AC_CONFIG_SRCDIR(src/varnish_mib.mib2c) |
20 | AM_CONFIG_HEADER(config.h) | 20 | AM_CONFIG_HEADER(config.h) |
21 | AC_CONFIG_AUX_DIR([build-aux]) | 21 | AC_CONFIG_AUX_DIR([build-aux]) |
diff --git a/git2chg.awk b/git2chg.awk index 6dad87e..e5dbe15 100644 --- a/git2chg.awk +++ b/git2chg.awk | |||
@@ -1,5 +1,5 @@ | |||
1 | # This file is part of grecs | 1 | # This file is part of grecs |
2 | # Copyright (C) 2007-2014 Sergey Poznyakoff | 2 | # Copyright (C) 2007-2015 Sergey Poznyakoff |
3 | # | 3 | # |
4 | # Grecs is free software; you can redistribute it and/or modify | 4 | # Grecs 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 |
diff --git a/src/Makefile.am b/src/Makefile.am index a10abd1..3c066f1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -1,5 +1,5 @@ | |||
1 | # This file is part of varnish-mib -*- automake -*- | 1 | # This file is part of varnish-mib -*- automake -*- |
2 | # Copyright (C) 2014 Sergey Poznyakoff | 2 | # Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | # | 3 | # |
4 | # varnish-mib is free software; you can redistribute it and/or modify | 4 | # varnish-mib 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 |
@@ -1,5 +1,5 @@ | |||
1 | /* This file is part of varnish-mib -*- c -*- | 1 | /* This file is part of varnish-mib -*- c -*- |
2 | Copyright (C) 2014 Sergey Poznyakoff | 2 | Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | 3 | ||
4 | Varnish-mib is free software; you can redistribute it and/or modify | 4 | Varnish-mib 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 |
@@ -1,5 +1,5 @@ | |||
1 | /* This file is part of varnish-mib -*- c -*- | 1 | /* This file is part of varnish-mib -*- c -*- |
2 | Copyright (C) 2014 Sergey Poznyakoff | 2 | Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | 3 | ||
4 | Varnish-mib is free software; you can redistribute it and/or modify | 4 | Varnish-mib 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 |
@@ -155,9 +155,11 @@ banTable_load(netsnmp_cache *cache, void *vmagic) | |||
155 | 155 | ||
156 | DEBUGMSGTL(("varnish_ban", "reloading ban table\n")); | 156 | DEBUGMSGTL(("varnish_ban", "reloading ban table\n")); |
157 | vd = varnish_get_vsm_data(); | 157 | vd = varnish_get_vsm_data(); |
158 | if (!vd) | ||
159 | return SNMP_ERR_NOSUCHNAME; | ||
158 | rc = vcli_connect(vd, &conn); | 160 | rc = vcli_connect(vd, &conn); |
159 | if (rc != SNMP_ERR_NOERROR) | 161 | if (rc != SNMP_ERR_NOERROR) |
160 | return rc; | 162 | return rc; |
161 | 163 | ||
162 | if (vcli_asprintf(&conn, "ban.list\n") || vcli_write(&conn)) | 164 | if (vcli_asprintf(&conn, "ban.list\n") || vcli_write(&conn)) |
163 | return SNMP_ERR_GENERR; | 165 | return SNMP_ERR_GENERR; |
diff --git a/src/betab.c b/src/betab.c index 41c18e7..b583958 100644 --- a/src/betab.c +++ b/src/betab.c | |||
@@ -223,9 +223,12 @@ create_entry_cb(void *priv, const struct VSC_point *const pt) | |||
223 | int | 223 | int |
224 | backendTable_load(netsnmp_cache *cache, void *vmagic) | 224 | backendTable_load(netsnmp_cache *cache, void *vmagic) |
225 | { | 225 | { |
226 | struct VSM_data *vd = varnish_get_vsm_data(); | ||
227 | struct betab_priv bp; | 226 | struct betab_priv bp; |
227 | struct VSM_data *vd = varnish_get_vsm_data(); | ||
228 | 228 | ||
229 | if (!vd) | ||
230 | return SNMP_ERR_NOSUCHNAME; | ||
231 | |||
229 | bp.idx = -1; | 232 | bp.idx = -1; |
230 | bp.err = 0; | 233 | bp.err = 0; |
231 | bp.table = (netsnmp_tdata *) vmagic; | 234 | bp.table = (netsnmp_tdata *) vmagic; |
diff --git a/src/varnish-mib.8 b/src/varnish-mib.8 index cc3276b..4559b0c 100644 --- a/src/varnish-mib.8 +++ b/src/varnish-mib.8 | |||
@@ -1,5 +1,5 @@ | |||
1 | .\" This file is part of Varnish-mib -*- nroff -*- | 1 | .\" This file is part of Varnish-mib -*- nroff -*- |
2 | .\" Copyright (C) 2014 Sergey Poznyakoff | 2 | .\" Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | .\" | 3 | .\" |
4 | .\" Varnish-mib is free software; you can redistribute it and/or modify | 4 | .\" Varnish-mib 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 |
diff --git a/src/varnish_mib.mib2c b/src/varnish_mib.mib2c index ae344be..a5367e0 100644 --- a/src/varnish_mib.mib2c +++ b/src/varnish_mib.mib2c | |||
@@ -1,5 +1,5 @@ | |||
1 | # This file is part of varnish-mib -*- c -*- | 1 | # This file is part of varnish-mib -*- c -*- |
2 | # Copyright (C) 2014 Sergey Poznyakoff | 2 | # Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | # | 3 | # |
4 | # Varnish-mib is free software; you can redistribute it and/or modify | 4 | # Varnish-mib 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 |
@@ -198,9 +198,6 @@ void | |||
198 | varnish_snmp_init(void) | 198 | varnish_snmp_init(void) |
199 | { | 199 | { |
200 | vd = VSM_New(); | 200 | vd = VSM_New(); |
201 | |||
202 | if (VSM_Open(vd)) | ||
203 | exit(1); | ||
204 | } | 201 | } |
205 | 202 | ||
206 | void | 203 | void |
@@ -240,12 +237,9 @@ handle_$i(netsnmp_mib_handler *handler, | |||
240 | @startperl@ | 237 | @startperl@ |
241 | &{$vars{'varnish_translate'}}($vars{'i'}); | 238 | &{$vars{'varnish_translate'}}($vars{'i'}); |
242 | @endperl@ | 239 | @endperl@ |
243 | 240 | ||
244 | if (VSM_Abandoned(vd)) { | 241 | if (!varnish_get_vsm_data()) |
245 | DEBUGMSGTL(("$modulename", "reopening vd\n")); | 242 | return SNMP_ERR_NOSUCHNAME; |
246 | VSM_Close(vd); | ||
247 | VSM_Open(vd); | ||
248 | } | ||
249 | 243 | ||
250 | switch(reqinfo->mode) { | 244 | switch(reqinfo->mode) { |
251 | case MODE_GET: | 245 | case MODE_GET: |
@@ -1,5 +1,5 @@ | |||
1 | /* This file is part of varnish-mib -*- c -*- | 1 | /* This file is part of varnish-mib -*- c -*- |
2 | Copyright (C) 2014 Sergey Poznyakoff | 2 | Copyright (C) 2014-2015 Sergey Poznyakoff |
3 | 3 | ||
4 | Varnish-mib is free software; you can redistribute it and/or modify | 4 | Varnish-mib 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 |