]> git.pld-linux.org Git - packages/apcupsd.git/blob - nodbg.patch
add fedora patches; including systemd support
[packages/apcupsd.git] / nodbg.patch
1 https://bugzilla.redhat.com/show_bug.cgi?id=1053324
2
3 diff -up apcupsd-3.14.10/src/drivers/snmplite/asn.cpp.nodbg apcupsd-3.14.10/src/drivers/snmplite/asn.cpp
4 --- apcupsd-3.14.10/src/drivers/snmplite/asn.cpp.nodbg  2010-09-07 17:35:13.000000000 +0200
5 +++ apcupsd-3.14.10/src/drivers/snmplite/asn.cpp        2014-01-21 17:07:27.603049214 +0100
6 @@ -26,10 +26,13 @@
7  #include <stdlib.h>
8  #include <stdio.h>
9  
10 +extern int debug_level;
11 +
12  using namespace Asn;
13  
14  void debug(const char *foo, int indent)
15  {
16 +   if (!debug_level) return;
17     while (indent--)
18        printf(" ");
19     printf("%s\n", foo);
20 @@ -86,7 +89,7 @@ Object *Object::Demarshal(unsigned char
21        obj = new Sequence(type);
22        break;      
23     default:
24 -      printf("UNKNOWN ASN type=0x%02x\n", type);
25 +      if (debug_level) printf("UNKNOWN ASN type=0x%02x\n", type);
26        debug("UNKNOWN", indent);
27        obj = NULL;
28        break;      
This page took 0.089268 seconds and 3 git commands to generate.