Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
1549-snmp-Types-and-specs-for-snmp_community_mi...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1549-snmp-Types-and-specs-for-snmp_community_mib-configur.patch of Package erlang
From ca4af91f266ef28cd9783ecc626bf80c1462a9a7 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Thu, 11 Jan 2024 14:25:54 +0100 Subject: [PATCH 29/67] [snmp] Types and specs for snmp_community_mib:configure/1 --- lib/snmp/doc/src/snmp_community_mib.xml | 7 ++----- lib/snmp/src/agent/snmp_community_mib.erl | 9 +++++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/snmp/doc/src/snmp_community_mib.xml b/lib/snmp/doc/src/snmp_community_mib.xml index a08a7c0f7a..258eaa3f6f 100644 --- a/lib/snmp/doc/src/snmp_community_mib.xml +++ b/lib/snmp/doc/src/snmp_community_mib.xml @@ -97,11 +97,8 @@ <funcs> <func> - <name since="">configure(ConfDir) -> void()</name> + <name name="configure" arity="1" clause_i="1" since=""/> <fsummary>Configure the SNMP-COMMUNITY-MIB</fsummary> - <type> - <v>ConfDir = string()</v> - </type> <desc> <p>This function is called from the supervisor at system start-up. @@ -162,7 +159,7 @@ <func> <name name="add_community" arity="5" clause_i="1" since=""/> <name name="add_community" arity="6" clause_i="1" since="OTP R14B03"/> - <fsummary>Added one community</fsummary> + <fsummary>Add one community</fsummary> <desc> <p>Adds a community to the agent config. Equivalent to one line in the <c>community.conf</c> file.</p> diff --git a/lib/snmp/src/agent/snmp_community_mib.erl b/lib/snmp/src/agent/snmp_community_mib.erl index b335928f96..b373bcc7c3 100644 --- a/lib/snmp/src/agent/snmp_community_mib.erl +++ b/lib/snmp/src/agent/snmp_community_mib.erl @@ -77,7 +77,11 @@ %% Returns: ok %% Fails: exit(configuration_error) %%----------------------------------------------------------------- -configure(Dir) -> + +-spec configure(ConfDir) -> snmp:void() when + ConfDir :: string(). + +configure(ConfDir) -> set_sname(), case db(snmpCommunityTable) of {_, mnesia} -> @@ -90,10 +94,11 @@ configure(Dir) -> gc_tabs(); false -> ?vlog("community table does not exist: reconfigure",[]), - reconfigure(Dir) + reconfigure(ConfDir) end end. + %%----------------------------------------------------------------- %% Func: reconfigure/1 %% Args: Dir is the directory where the configuration files are found. -- 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