summaryrefslogtreecommitdiff
path: root/ASNMP/asnmp/vb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ASNMP/asnmp/vb.cpp')
-rw-r--r--ASNMP/asnmp/vb.cpp6
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;
}