aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-11-17 21:58:14 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2014-11-17 21:58:14 +0200
commitf0671d1bc19592e5b659959920b51e3da05de79f (patch)
treeb796d82e0ffe0f72fe0fc5b89ea7336653c826d7 /src
parent05fa31b7d7d1f23dde152341fc2f8149e66c40a5 (diff)
downloadvarnish-mib-f0671d1bc19592e5b659959920b51e3da05de79f.tar.gz
varnish-mib-f0671d1bc19592e5b659959920b51e3da05de79f.tar.bz2
Check if vsm is abandoned, reopen if so.
Diffstat (limited to 'src')
-rw-r--r--src/varnish_mib.mib2c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/varnish_mib.mib2c b/src/varnish_mib.mib2c
index 6df10ec..af56a0e 100644
--- a/src/varnish_mib.mib2c
+++ b/src/varnish_mib.mib2c
@@ -116,7 +116,14 @@ handle_$i(netsnmp_mib_handler *handler,
&{$vars{'varnish_translate'}}($vars{'i'});
@endperl@
if (reqinfo->mode == MODE_GET) {
- struct VSC_C_main const *st = VSC_Main(vd, NULL);
+ struct VSC_C_main const *st;
+
+ if (VSM_Abandoned(vd)) {
+ VSM_Close(vd);
+ VSM_Open(vd);
+ }
+
+ st = VSC_Main(vd, NULL);
if (!st)
return SNMP_ERR_NOSUCHNAME;
snmp_set_var_typed_value(requests->requestvb, $i.type,
@@ -140,7 +147,7 @@ init_$modulename(void)
const oid ${i}_oid[] = { $i.commaoid };
@end@
- DEBUGMSGTL(("$name", "Initializing\n"));
+ DEBUGMSGTL(("$modulename", "Initializing\n"));
@foreach $i scalar@
netsnmp_register_scalar(

Return to:

Send suggestions and report system problems to the System administrator.