summaryrefslogtreecommitdiff
path: root/ASNMP
diff options
context:
space:
mode:
authormrm <mrm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-30 21:28:31 +0000
committermrm <mrm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-30 21:28:31 +0000
commitba7066cce1b7e08acc941cfe1d3d55ae58cfd7c2 (patch)
tree41ef6288cac83c486b7a010b4116ee669622e661 /ASNMP
parent7dd4e87c137b7f081941ef77c47fdf3284d228b5 (diff)
downloadATCD-ba7066cce1b7e08acc941cfe1d3d55ae58cfd7c2.tar.gz
fix Gauge/unsigned int vb retrieval
Diffstat (limited to 'ASNMP')
-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;
}