diff options
author | mrm <mrm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-30 21:28:31 +0000 |
---|---|---|
committer | mrm <mrm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-30 21:28:31 +0000 |
commit | 9a668a33e0f21f39c92623dada122288bb049c09 (patch) | |
tree | 41ef6288cac83c486b7a010b4116ee669622e661 /ASNMP/asnmp | |
parent | b746ac497bad2c88f4e1e5ab9835b944e8b56cd4 (diff) | |
download | ATCD-9a668a33e0f21f39c92623dada122288bb049c09.tar.gz |
fix Gauge/unsigned int vb retrieval
Diffstat (limited to 'ASNMP/asnmp')
-rw-r--r-- | ASNMP/asnmp/vb.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ASNMP/asnmp/vb.cpp b/ASNMP/asnmp/vb.cpp index 7767018fa7a..3a4696d978f 100644 --- a/ASNMP/asnmp/vb.cpp +++ b/ASNMP/asnmp/vb.cpp @@ -232,11 +232,15 @@ int Vb::get_value( SnmpUInt32 &u) return SNMP_CLASS_INVALID; } +/* return a uint or a gauge. this is casting, but no semantic difference + * at this level + */ int Vb::get_value( Gauge32 &g) { if (iv_vb_value_ && iv_vb_value_->valid() && - (iv_vb_value_->get_syntax() == sNMP_SYNTAX_GAUGE32 )) { + ((iv_vb_value_->get_syntax() == sNMP_SYNTAX_GAUGE32) || + iv_vb_value_->get_syntax() == sNMP_SYNTAX_UINT32) ) { g = *((Gauge32 *) iv_vb_value_); return SNMP_CLASS_SUCCESS; } |