Module: kamailio
Branch: master
Commit: 45c3dbee619f999ddafc79a88d1a49141b76fa9f
URL:
https://github.com/kamailio/kamailio/commit/45c3dbee619f999ddafc79a88d1a491…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: 2015-02-05T21:18:07+01:00
libkcore Disable checking of /proc files on non-linux systems
---
Modified: lib/kcore/statistics.c
---
Diff:
https://github.com/kamailio/kamailio/commit/45c3dbee619f999ddafc79a88d1a491…
Patch:
https://github.com/kamailio/kamailio/commit/45c3dbee619f999ddafc79a88d1a491…
---
diff --git a/lib/kcore/statistics.c b/lib/kcore/statistics.c
index 6c63a43..d18b804 100644
--- a/lib/kcore/statistics.c
+++ b/lib/kcore/statistics.c
@@ -371,6 +371,12 @@ static int get_used_waiting_queue(
int waitingQueueSize = 0;
+#ifndef __OS_linux
+ /* /proc/net/tcp and /proc/net/udp only exists on Linux systems, so don't bother
with
+ trying to open these files */
+ return 0;
+#endif
+
/* Set up the file we want to open. */
if (forTCP) {
fileToOpen = "/proc/net/tcp";