Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
2851-snmp-Types-and-specs-for-snmp_community_mi...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2851-snmp-Types-and-specs-for-snmp_community_mib-reconfig.patch of Package erlang
From c83614e388944250cd30f3fd53db8f780761063e Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Thu, 11 Jan 2024 15:04:44 +0100 Subject: [PATCH 31/67] [snmp] Types and specs for snmp_community_mib:reconfigure/1 --- lib/snmp/doc/src/snmp_community_mib.xml | 43 +++++++++++------------ lib/snmp/src/agent/snmp_community_mib.erl | 8 +++-- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/lib/snmp/doc/src/snmp_community_mib.xml b/lib/snmp/doc/src/snmp_community_mib.xml index ccecc10a91..ffd7f79290 100644 --- a/lib/snmp/doc/src/snmp_community_mib.xml +++ b/lib/snmp/doc/src/snmp_community_mib.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1999</year><year>2020</year> + <year>1999</year><year>2024</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -126,31 +126,28 @@ </func> <func> - <name since="">reconfigure(ConfDir) -> void()</name> + <name name="reconfigure" arity="1" clause_i="1" since=""/> <fsummary>Configure the SNMP-COMMUNITY-MIB</fsummary> - <type> - <v>ConfDir = string()</v> - </type> <desc> <p>Inserts all data in the configuration files into the - database and destroys all old data, including the rows with - StorageType <c>nonVolatile</c>. The rows created from the - configuration file will have StorageType <c>nonVolatile</c>. - </p> - <p>Thus, the data in the SNMP-COMMUNITY-MIB, after this - function has been called, is from the configuration files. - </p> - <p>All <c>snmp</c> counters are set to zero. - </p> - <p>If an error is found in the configuration file, it is - reported using the function <c>config_err/2</c> of the error report - module, and the function fails with reason - <c>configuration_error</c>. - </p> - <p><c>ConfDir</c> is a string which points to the directory - where the configuration files are found. - </p> - <p>The configuration file read is: <c>community.conf</c>.</p> + database and destroys all old data, including the rows with + StorageType <c>nonVolatile</c>. The rows created from the + configuration file will have StorageType <c>nonVolatile</c>. </p> + + <p>Thus, the data in the SNMP-COMMUNITY-MIB, after this + function has been called, is from the configuration files. </p> + + <p>All <c>snmp</c> counters are set to zero. </p> + + <p>If an error is found in the configuration file, it is + reported using the function <c>config_err/2</c> of the error report + module, and the function fails with reason + <c>configuration_error</c>. </p> + + <p><c>ConfDir</c> is a string which points to the directory + where the configuration files are found. </p> + + <p>The configuration file read is: <c>community.conf</c>.</p> <marker id="add_community"></marker> </desc> diff --git a/lib/snmp/src/agent/snmp_community_mib.erl b/lib/snmp/src/agent/snmp_community_mib.erl index f4c6d6fde0..c94e3bbe0e 100644 --- a/lib/snmp/src/agent/snmp_community_mib.erl +++ b/lib/snmp/src/agent/snmp_community_mib.erl @@ -110,9 +110,13 @@ configure(ConfDir) -> %% Returns: ok %% Fails: exit(configuration_error) %%----------------------------------------------------------------- -reconfigure(Dir) -> + +-spec reconfigure(ConfDir) -> snmp:void() when + ConfDir :: string(). + +reconfigure(ConfDir) -> set_sname(), - case (catch do_reconfigure(Dir)) of + case (catch do_reconfigure(ConfDir)) of ok -> ok; {error, Reason} -> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor