diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-02-02 16:22:48 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-02-02 16:22:48 +0200 |
commit | 620585d1fb7376eaa5a78bd1de44cf9483975b7d (patch) | |
tree | 13046ca443fbc9d45588216670dd1874f46017aa /src/varnish_mib.mib2c | |
parent | 78e306ee5b588c86d51f7880908cf8031da13445 (diff) | |
download | varnish-mib-620585d1fb7376eaa5a78bd1de44cf9483975b7d.tar.gz varnish-mib-620585d1fb7376eaa5a78bd1de44cf9483975b7d.tar.bz2 |
Don't exit if unable to open Varnish memory file
* NEWS: Update.
* configure.ac: Version 1.0.90
* src/ban.c (banTable_load): Check if vd is available.
* src/betab.c: Likewise.
* src/varnish_mib.mib2c (varnish_snmp_init): Don't open vd right now.
* Makefile.am: Update copyright year.
* README: Update copyright year.
* git2chg.awk: Update copyright year.
* src/Makefile.am: Update copyright year.
* src/auth.c: Update copyright year.
* src/varnish-mib.8: Update copyright year.
* src/vcli.c: Update copyright year.
Diffstat (limited to 'src/varnish_mib.mib2c')
-rw-r--r-- | src/varnish_mib.mib2c | 14 |
1 files changed, 4 insertions, 10 deletions
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 @@ # This file is part of varnish-mib -*- c -*- -# Copyright (C) 2014 Sergey Poznyakoff +# Copyright (C) 2014-2015 Sergey Poznyakoff # # Varnish-mib is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -198,9 +198,6 @@ void varnish_snmp_init(void) { vd = VSM_New(); - - if (VSM_Open(vd)) - exit(1); } void @@ -240,12 +237,9 @@ handle_$i(netsnmp_mib_handler *handler, @startperl@ &{$vars{'varnish_translate'}}($vars{'i'}); @endperl@ - - if (VSM_Abandoned(vd)) { - DEBUGMSGTL(("$modulename", "reopening vd\n")); - VSM_Close(vd); - VSM_Open(vd); - } + + if (!varnish_get_vsm_data()) + return SNMP_ERR_NOSUCHNAME; switch(reqinfo->mode) { case MODE_GET: |