Blob Blame History Raw
diff -up apcupsd-3.14.10/src/drivers/snmplite/asn.cpp.nodbg apcupsd-3.14.10/src/drivers/snmplite/asn.cpp
--- apcupsd-3.14.10/src/drivers/snmplite/asn.cpp.nodbg	2010-09-07 17:35:13.000000000 +0200
+++ apcupsd-3.14.10/src/drivers/snmplite/asn.cpp	2014-01-21 17:07:27.603049214 +0100
@@ -26,10 +26,13 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+extern int debug_level;
+
 using namespace Asn;
 
 void debug(const char *foo, int indent)
 {
+   if (!debug_level) return;
    while (indent--)
       printf(" ");
    printf("%s\n", foo);
@@ -86,7 +89,7 @@ Object *Object::Demarshal(unsigned char
       obj = new Sequence(type);
       break;      
    default:
-      printf("UNKNOWN ASN type=0x%02x\n", type);
+      if (debug_level) printf("UNKNOWN ASN type=0x%02x\n", type);
       debug("UNKNOWN", indent);
       obj = NULL;
       break;