diff options
Diffstat (limited to 'src/varnish_mib.mib2c')
-rw-r--r-- | src/varnish_mib.mib2c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/src/varnish_mib.mib2c b/src/varnish_mib.mib2c index e8c143f..df8b537 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-2018 Sergey Poznyakoff +# Copyright (C) 2014-2019 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 @@ -197,6 +197,10 @@ int varnish_ban(netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests, struct vsm *vsm); +void init_$modulename(void); +void deinit_$modulename(void); +int post_config(void); + @open ${name}@ /* THIS FILE IS GENERATED AUTOMATICALLY. PLEASE DO NOT EDIT. */ @@ -209,7 +213,7 @@ static struct vsc *vsc; static void dict_load(struct vsc *vsc); int -post_config(int majorID, int minorID, void *serverarg, void *clientarg) +post_config(void) { vsm = VSM_New(); if (!vsm) { @@ -231,21 +235,6 @@ post_config(int majorID, int minorID, void *serverarg, void *clientarg) return 0; } -void -varnish_snmp_init(void) -{ - snmp_register_callback(SNMP_CALLBACK_LIBRARY, - SNMP_CALLBACK_POST_READ_CONFIG, - post_config, - NULL); -} - -void -varnish_snmp_deinit(void) -{ - /* FIXME? */ -} - struct vsm * varnish_get_vsm_data(void) { @@ -675,10 +664,6 @@ initialize_table_$i(void) void init_$modulename(void) { - if (vsm) { - snmp_log(LOG_ERR, "%s: can't be loaded twice\n", "$modulename"); - abort(); - } @foreach $i scalar@ @startperl@ &{$vars{'varnish_translate'}}($vars{'i'}); @@ -716,12 +701,11 @@ $varnish_endif @foreach $i table@ initialize_table_$i(); @end@ - varnish_snmp_init(); } void deinit_$modulename(void) { - varnish_snmp_deinit(); + // FIXME } @calldefine ROCOM@ |