aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/snmp')
-rw-r--r--lib/snmp/src/manager/snmpm_server.erl46
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,