aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_manager_user.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-04-15 10:37:44 +0200
committerMicael Karlberg <[email protected]>2011-04-15 10:37:44 +0200
commit625b265bfe3ba77f7554f8e7a7be29abff9eaaba (patch)
tree20edcc7aaa60f57c1c65ad9ae25a7db241ef086f /lib/snmp/test/snmp_manager_user.erl
parentfe2f0b21b8da7e7a83c74d5bb174d52bfcd380bd (diff)
downloadotp-625b265bfe3ba77f7554f8e7a7be29abff9eaaba.tar.gz
otp-625b265bfe3ba77f7554f8e7a7be29abff9eaaba.tar.bz2
otp-625b265bfe3ba77f7554f8e7a7be29abff9eaaba.zip
Async set test case for version 3 request API.
Diffstat (limited to 'lib/snmp/test/snmp_manager_user.erl')
-rw-r--r--lib/snmp/test/snmp_manager_user.erl15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/snmp/test/snmp_manager_user.erl b/lib/snmp/test/snmp_manager_user.erl
index 7c4bdbfb0a..34f0779e9c 100644
--- a/lib/snmp/test/snmp_manager_user.erl
+++ b/lib/snmp/test/snmp_manager_user.erl
@@ -55,7 +55,7 @@
sync_get_next/1, sync_get_next/2, sync_get_next/3, sync_get_next2/3,
async_get_next/1, async_get_next/2, async_get_next/3, async_get_next2/3,
sync_set/1, sync_set/2, sync_set/3, sync_set2/3,
- async_set/1, async_set/2, async_set/3,
+ async_set/1, async_set/2, async_set/3, async_set2/3,
sync_get_bulk/3, sync_get_bulk/4, sync_get_bulk/5,
async_get_bulk/3, async_get_bulk/4, async_get_bulk/5,
name_to_oid/1, oid_to_name/1,
@@ -242,6 +242,9 @@ async_set(Addr_or_TargetName, VAV) ->
async_set(Addr, Port, VAV) ->
call({async_set, Addr, Port, VAV}).
+async_set2(TargetName, VAV, SendOpts) ->
+ call({async_set2, TargetName, VAV, SendOpts}).
+
%% --
sync_get_bulk(NonRep, MaxRep, Oids) ->
@@ -634,6 +637,16 @@ loop(#state{parent = Parent, id = Id} = S) ->
%% -- (async) set-request --
%%
+ {{async_set2, TargetName, VAV, SendOpts}, From, Ref}
+ when is_list(TargetName) ->
+ d("loop -> received async_set2 request with"
+ "~n TargetName: ~p"
+ "~n VAV: ~p"
+ "~n SendOpts: ~p", [TargetName, VAV, SendOpts]),
+ Res = snmpm:async_set2(Id, TargetName, VAV, SendOpts),
+ reply(From, Res, Ref),
+ loop(S);
+
{{async_set, VAV}, From, Ref} ->
d("loop -> received async_set request"),
Res = [snmpm:async_set(Id, TargetName, VAV) ||