Browse Source

snmpstats: include stats wrapper headers

Daniel-Constantin Mierla 15 years ago
parent
commit
44c76b5636
2 changed files with 5 additions and 1 deletions
  1. 3 1
      modules_k/snmpstats/snmpSIPCommonObjects.c
  2. 2 0
      modules_k/snmpstats/utilities.c

+ 3 - 1
modules_k/snmpstats/snmpSIPCommonObjects.c

@@ -236,7 +236,9 @@ int handle_openserSIPServiceStartTime(netsnmp_mib_handler *handler,
 		LM_ERR("failed to read sysUpTime file at %s\n",
 				SNMPGET_TEMP_FILE);
 	} else {
-		fgets(buffer, SNMPGET_MAX_BUFFER, theFile);
+		if(fgets(buffer, SNMPGET_MAX_BUFFER, theFile)==NULL)
+			LM_ERR("failed to read from sysUpTime file at %s\n",
+					SNMPGET_TEMP_FILE);
 
 		/* Find the positions of '(' and ')' so we can extract out the
 		 * timeticks value. */

+ 2 - 0
modules_k/snmpstats/utilities.c

@@ -46,6 +46,8 @@
 #include "../../locking.h"
 #include "../../mem/mem.h"
 
+#include "../../lib/kcore/kstats_wrapper.h"
+
 /*!
  * This function copies an OpenSER "str" datatype into a '\\0' terminated char*
  * string.