[PATCH] Fix handling of exceptions and missing values in Vb::get_printable_value().

Dominik Vogt dominik.vogt at external.thalesgroup.com
Tue Jan 25 10:16:58 CET 2011


---
 src/vb.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/vb.cpp b/src/vb.cpp
index e8d760c..ff8014d 100644
--- a/src/vb.cpp
+++ b/src/vb.cpp
@@ -359,8 +359,12 @@ static char blank_string[] = "";
 // return the printabel value
 const char WINFAR *Vb::get_printable_value() const
 {
-  if (iv_vb_value)
+  if (iv_vb_value &&
+      iv_vb_value->valid() &&
+      exception_status == SNMP_CLASS_SUCCESS)
+  {
     return iv_vb_value->get_printable();
+  }
   return blank_string;
 }
 
-- 
1.5.5.6


--Q68bSM7Ycu6FN28Q--



More information about the AGENTPP mailing list