diff options
author | Micael Karlberg <[email protected]> | 2011-04-08 17:52:22 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-04-08 17:52:22 +0200 |
commit | 554991eb76601ad74d5c8c045fcf53049c9fa39f (patch) | |
tree | 9696787768201c7e2b5042170f3ad729a64c66a7 /lib/snmp | |
parent | 24a9408229d14b3b0c41265f0c9f4c6d164e92ed (diff) | |
download | otp-554991eb76601ad74d5c8c045fcf53049c9fa39f.tar.gz otp-554991eb76601ad74d5c8c045fcf53049c9fa39f.tar.bz2 otp-554991eb76601ad74d5c8c045fcf53049c9fa39f.zip |
Some handle_call-cases handled.
Diffstat (limited to 'lib/snmp')
-rw-r--r-- | lib/snmp/src/manager/snmpm_server.erl | 46 |
1 files changed, 42 insertions, 4 deletions
diff --git a/lib/snmp/src/manager/snmpm_server.erl b/lib/snmp/src/manager/snmpm_server.erl index 08f9703e9d..13136ef1c0 100644 --- a/lib/snmp/src/manager/snmpm_server.erl +++ b/lib/snmp/src/manager/snmpm_server.erl @@ -687,7 +687,8 @@ handle_call({unregister_user, UserId}, _From, State) -> %% agent, or when the timeout hits (unless we get an error now). handle_call({sync_get, Pid, UserId, TargetName, Oids, SendOpts}, From, State) -> - ?vlog("received sync_get [~p] request", [TargetName]), + ?vlog("[~p,~p] received sync_get request for" + "~n ~p", [UserId, TargetName, Opts]), case (catch handle_sync_get(Pid, UserId, TargetName, Oids, SendOpts, From, State)) of @@ -698,9 +699,11 @@ handle_call({sync_get, Pid, UserId, TargetName, Oids, SendOpts}, end; %% <BACKWARD-COMPAT> +%% The only case where this would be called is during code upgrade handle_call({sync_get, Pid, UserId, TargetName, CtxName, Oids, Timeout, ExtraInfo}, From, State) -> - ?vlog("received sync_get [~p] request", [CtxName]), + ?vlog("[~p,~p] received sync_get request for" + "~n ~p", [UserId, TargetName, Opts]), case (catch handle_sync_get(Pid, UserId, TargetName, CtxName, Oids, Timeout, ExtraInfo, From, State)) of @@ -712,8 +715,26 @@ handle_call({sync_get, Pid, UserId, TargetName, CtxName, Oids, Timeout, ExtraInf %% </BACKWARD-COMPAT> -handle_call({sync_get_next, Pid, UserId, TargetName, CtxName, Oids, Timeout, ExtraInfo}, From, State) -> - ?vlog("received sync_get_next [~p] request", [CtxName]), +handle_call({sync_get_next, Pid, UserId, TargetName, Oids, SendOpts}, + From, State) -> + ?vlog("[~p,~p] received sync_get_next request for: " + "~n ~p", [UserId, TargetName, Opts]), + case (catch handle_sync_get_next(Pid, + UserId, TargetName, Oids, SendOpts, + From, State)) of + ok -> + {noreply, State}; + Error -> + {reply, Error, State} + end; + + +%% <BACKWARD-COMPAT> +%% The only case where this would be called is during code upgrade +handle_call({sync_get_next, Pid, UserId, TargetName, CtxName, Oids, + Timeout, ExtraInfo}, From, State) -> + ?vlog("[~p,~p] received sync_get_next request for" + "~n ~p", [UserId, TargetName, Opts]), case (catch handle_sync_get_next(Pid, UserId, TargetName, CtxName, Oids, Timeout, ExtraInfo, From, State)) of @@ -722,10 +743,26 @@ handle_call({sync_get_next, Pid, UserId, TargetName, CtxName, Oids, Timeout, Ext Error -> {reply, Error, State} end; +%% </BACKWARD-COMPAT> %% Check agent version? This op not in v1 handle_call({sync_get_bulk, Pid, UserId, TargetName, + NonRep, MaxRep, Oids, SendOpts}, + From, State) -> + ?vlog("received sync_get_bulk [~p] request", [CtxName]), + case (catch handle_sync_get_bulk(Pid, + UserId, TargetName, NonRep, MaxRep, Oids, + SendOpts, From, State)) of + ok -> + {noreply, State}; + Error -> + {reply, Error, State} + end; + +%% <BACKWARD-COMPAT> +%% The only case where this would be called is during code upgrade +handle_call({sync_get_bulk, Pid, UserId, TargetName, NonRep, MaxRep, CtxName, Oids, Timeout, ExtraInfo}, From, State) -> ?vlog("received sync_get_bulk [~p] request", [CtxName]), @@ -738,6 +775,7 @@ handle_call({sync_get_bulk, Pid, UserId, TargetName, Error -> {reply, Error, State} end; +%% </BACKWARD-COMPAT> handle_call({sync_set, Pid, UserId, TargetName, |