aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2014-12-01 11:20:09 +0100
committerRaimo Niskanen <[email protected]>2014-12-01 11:20:09 +0100
commit8e4ccfc3a9a7a1a4a7c607c88a205490bcf5d490 (patch)
treeb02ee933bd0733b0f9b001520c74b4a2acd4ae31
parent364280b70519c261bb26c8a54169b6250e09c539 (diff)
parent5a053f10425a6c517c113c375d6306f9716bfe31 (diff)
downloadotp-8e4ccfc3a9a7a1a4a7c607c88a205490bcf5d490.tar.gz
otp-8e4ccfc3a9a7a1a4a7c607c88a205490bcf5d490.tar.bz2
otp-8e4ccfc3a9a7a1a4a7c607c88a205490bcf5d490.zip
Merge branch 'maint'
-rw-r--r--lib/snmp/src/manager/snmpm_net_if.erl19
-rw-r--r--lib/snmp/test/snmp_test_mgr.erl2
2 files changed, 12 insertions, 9 deletions
diff --git a/lib/snmp/src/manager/snmpm_net_if.erl b/lib/snmp/src/manager/snmpm_net_if.erl
index cb72871177..b4cc165d2e 100644
--- a/lib/snmp/src/manager/snmpm_net_if.erl
+++ b/lib/snmp/src/manager/snmpm_net_if.erl
@@ -319,7 +319,7 @@ socket_open(IpPort, SocketOpts) ->
Socket
end.
-socket_params(Domain, {IpAddr, IpPort}, BindTo, CommonSocketOpts) ->
+socket_params(Domain, {IpAddr, IpPort} = Addr, BindTo, CommonSocketOpts) ->
Family = snmp_conf:tdomain_to_family(Domain),
SocketOpts =
case Family of
@@ -340,15 +340,18 @@ socket_params(Domain, {IpAddr, IpPort}, BindTo, CommonSocketOpts) ->
{0, [{fd, Fd} | SocketOpts]}
end;
error ->
- {IpPort, [{ip, IpAddr} | SocketOpts]}
+ socket_params(SocketOpts, Addr, BindTo)
end;
_ ->
- case BindTo of
- true ->
- {IpPort, [{ip, IpAddr} | SocketOpts]};
- _ ->
- {IpPort, SocketOpts}
- end
+ socket_params(SocketOpts, Addr, BindTo)
+ end.
+%%
+socket_params(SocketOpts, {IpAddr, IpPort}, BindTo) ->
+ case BindTo of
+ true ->
+ {IpPort, [{ip, IpAddr} | SocketOpts]};
+ _ ->
+ {IpPort, SocketOpts}
end.
common_socket_opts(Opts) ->
diff --git a/lib/snmp/test/snmp_test_mgr.erl b/lib/snmp/test/snmp_test_mgr.erl
index cf62edba1c..8cb6ec588e 100644
--- a/lib/snmp/test/snmp_test_mgr.erl
+++ b/lib/snmp/test/snmp_test_mgr.erl
@@ -161,7 +161,7 @@ get_timeout() ->
get_timeout(os:type())
end.
-get_timeout(_) -> 3500.
+get_timeout(_) -> 10000. % Trying to improve test results % 3500.
%%----------------------------------------------------------------------
%% Receives a trap from the agent.