[sr-dev] git:master: snmpstats: include stats wrapper headers
Daniel-Constantin Mierla
miconda at gmail.com
Wed Sep 29 23:51:05 CEST 2010
Module: sip-router
Branch: master
Commit: 44c76b5636e49c60349e52bc7eecd1038d4c901a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=44c76b5636e49c60349e52bc7eecd1038d4c901a
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Wed Sep 29 23:50:05 2010 +0200
snmpstats: include stats wrapper headers
---
modules_k/snmpstats/snmpSIPCommonObjects.c | 4 +++-
modules_k/snmpstats/utilities.c | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules_k/snmpstats/snmpSIPCommonObjects.c b/modules_k/snmpstats/snmpSIPCommonObjects.c
index 9494291..9db4573 100644
--- a/modules_k/snmpstats/snmpSIPCommonObjects.c
+++ b/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. */
diff --git a/modules_k/snmpstats/utilities.c b/modules_k/snmpstats/utilities.c
index 9b4011d..1880156 100644
--- a/modules_k/snmpstats/utilities.c
+++ b/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.
More information about the sr-dev
mailing list