aboutsummaryrefslogtreecommitdiff
path: root/src/varnish_mib.mib2c
diff options
context:
space:
mode:
Diffstat (limited to 'src/varnish_mib.mib2c')
-rw-r--r--src/varnish_mib.mib2c14
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 @@
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
198varnish_snmp_init(void) 198varnish_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
206void 203void
@@ -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:

Return to:

Send suggestions and report system problems to the System administrator.