diff options
author | Raimo Niskanen <[email protected]> | 2014-12-01 11:19:59 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2014-12-01 11:19:59 +0100 |
commit | 5a053f10425a6c517c113c375d6306f9716bfe31 (patch) | |
tree | 844370cc5864e886f49789ad3595d1a12ba0cfc1 | |
parent | a3c6ca9a4732984c5530fe9c03c6fe45ac1369f2 (diff) | |
parent | 6d37adcd745eca986446b0a7365feb76ead60e80 (diff) | |
download | otp-5a053f10425a6c517c113c375d6306f9716bfe31.tar.gz otp-5a053f10425a6c517c113c375d6306f9716bfe31.tar.bz2 otp-5a053f10425a6c517c113c375d6306f9716bfe31.zip |
Merge branch 'raimo/snmp/dev' into maint
* raimo/snmp/dev:
Try to increase test case timeouts
Honor bind_to for manager net_if family inet
-rw-r--r-- | lib/snmp/src/manager/snmpm_net_if.erl | 19 | ||||
-rw-r--r-- | lib/snmp/test/snmp_test_mgr.erl | 2 |
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. |