[sr-dev] git:master:45c3dbee: libkcore Disable checking of /proc files on non-linux systems
Olle E. Johansson
oej at edvina.net
Thu Feb 5 21:18:46 CET 2015
Module: kamailio
Branch: master
Commit: 45c3dbee619f999ddafc79a88d1a49141b76fa9f
URL: https://github.com/kamailio/kamailio/commit/45c3dbee619f999ddafc79a88d1a49141b76fa9f
Author: Olle E. Johansson <oej at edvina.net>
Committer: Olle E. Johansson <oej at 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/45c3dbee619f999ddafc79a88d1a49141b76fa9f.diff
Patch: https://github.com/kamailio/kamailio/commit/45c3dbee619f999ddafc79a88d1a49141b76fa9f.patch
---
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";
More information about the sr-dev
mailing list