aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/manager/snmpm_mpd.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2014-06-19 16:08:28 +0200
committerRaimo Niskanen <[email protected]>2014-07-25 12:17:49 +0200
commit41fe52bd9540307cdb6e2e4ba06d36b11c9fd6bd (patch)
tree01faec4e1be39f6989cf64ebc208c005d2253123 /lib/snmp/src/manager/snmpm_mpd.erl
parent4dba07b435696393adbf582933f9b539be48b943 (diff)
downloadotp-41fe52bd9540307cdb6e2e4ba06d36b11c9fd6bd.tar.gz
otp-41fe52bd9540307cdb6e2e4ba06d36b11c9fd6bd.tar.bz2
otp-41fe52bd9540307cdb6e2e4ba06d36b11c9fd6bd.zip
Add testcases and do related fixes
Diffstat (limited to 'lib/snmp/src/manager/snmpm_mpd.erl')
-rw-r--r--lib/snmp/src/manager/snmpm_mpd.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/snmp/src/manager/snmpm_mpd.erl b/lib/snmp/src/manager/snmpm_mpd.erl
index 521c496adb..f8a7441c0a 100644
--- a/lib/snmp/src/manager/snmpm_mpd.erl
+++ b/lib/snmp/src/manager/snmpm_mpd.erl
@@ -170,7 +170,7 @@ process_v1_v2c_msg(
end,
Max = get_max_message_size(),
- AgentMax = get_agent_max_message_size(Addr),
+ AgentMax = get_agent_max_message_size(Domain, Addr),
PduMS = pdu_ms(Max, AgentMax, HS),
?vtrace("process_v1_v2c_msg -> PduMS: ~p", [PduMS]),
@@ -862,12 +862,13 @@ get_max_message_size() ->
end.
%% The the MMS of the agent
-get_agent_max_message_size({Addr, Port}) ->
- case snmpm_config:get_agent_engine_max_message_size(Addr, Port) of
+get_agent_max_message_size(Domain, Addr) ->
+ case snmpm_config:get_agent_engine_max_message_size(Domain, Addr) of
{ok, MMS} ->
MMS;
_Error ->
- ?vlog("unknown agent: ~w:~w", [Addr, Port]),
+ ?vlog("unknown agent: ~s",
+ [snmp_conf:mk_addr_string({Domain, Addr})]),
get_max_message_size()
end.
%% get_agent_max_message_size(Addr, Port) ->