aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmpa_mib_lib.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-01-24 13:49:45 +0100
committerMicael Karlberg <[email protected]>2012-01-24 13:49:45 +0100
commit8ae3c543864bfe62b80667a950340281e9fb79f3 (patch)
treeba992366873ba156a5da06e7f27ddebf3ab2727e /lib/snmp/src/agent/snmpa_mib_lib.erl
parent7619b94a2c1098cbd176507b34d291806833a4b7 (diff)
parente0e862b42d508b5112395f41584bed90c74a8a92 (diff)
downloadotp-8ae3c543864bfe62b80667a950340281e9fb79f3.tar.gz
otp-8ae3c543864bfe62b80667a950340281e9fb79f3.tar.bz2
otp-8ae3c543864bfe62b80667a950340281e9fb79f3.zip
[snmp] Merged from R13B and also fixed appup
Merge from R13B maintenance branch (snmp-4.17.3), fixed appup and source diff (there is some between snmp-4.17.3 and 4.21.6). Merge branch 'maint-r13' into bmk/snmp/snmp4216_integration/r14 Conflicts: lib/snmp/doc/src/notes.xml lib/snmp/src/agent/snmpa.erl lib/snmp/src/agent/snmpa_agent.erl lib/snmp/src/agent/snmpa_trap.erl lib/snmp/src/app/snmp.appup.src lib/snmp/test/snmp_agent_test.erl lib/snmp/vsn.mk
Diffstat (limited to 'lib/snmp/src/agent/snmpa_mib_lib.erl')
-rw-r--r--lib/snmp/src/agent/snmpa_mib_lib.erl20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/snmp/src/agent/snmpa_mib_lib.erl b/lib/snmp/src/agent/snmpa_mib_lib.erl
index 078e681945..3c94cc8095 100644
--- a/lib/snmp/src/agent/snmpa_mib_lib.erl
+++ b/lib/snmp/src/agent/snmpa_mib_lib.erl
@@ -61,23 +61,23 @@ table_del_row({Tab, Db} = TabDb, Key) ->
get_table(NameDb, FOI) ->
(catch get_table(NameDb, FOI, [], [])).
-get_table(NameDb, FOI, Oid, Acc) ->
- case table_next(NameDb, Oid) of
+get_table(NameDb, FOI, Key, Acc) ->
+ case table_next(NameDb, Key) of
endOfTable ->
?vdebug("end of table",[]),
{ok, lists:reverse(Acc)};
- Oid ->
+ Key ->
%% Crap, circular ref
- ?vinfo("cyclic reference: ~w -> ~w", [Oid,Oid]),
- throw({error, {cyclic_db_reference, Oid, Acc}});
- NextOid ->
- ?vtrace("get row for oid ~w", [NextOid]),
- case table_get_row(NameDb, NextOid, FOI) of
+ ?vinfo("cyclic reference: ~w -> ~w", [Key, Key]),
+ throw({error, {cyclic_db_reference, Key, Acc}});
+ NextKey ->
+ ?vtrace("get row for key ~w", [NextKey]),
+ case table_get_row(NameDb, NextKey, FOI) of
undefined ->
- throw({error, {invalid_rowindex, NextOid, Acc}});
+ throw({error, {invalid_rowindex, NextKey, Acc}});
Row ->
?vtrace("row: ~w", [Row]),
- get_table(NameDb, FOI, NextOid, [{NextOid, Row}|Acc])
+ get_table(NameDb, FOI, NextKey, [{NextKey, Row}|Acc])
end
end.