Module: kamailio
Branch: master
Commit: 96efbdad0e9ed320657f56c3a0b4a5e54b1cdd5c
URL:
https://github.com/kamailio/kamailio/commit/96efbdad0e9ed320657f56c3a0b4a5e…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2022-03-07T09:20:39+01:00
snmpstats: fix build, update memory field
CC (gcc) [M snmpstats.so]
kamailioServer.o
kamailioServer.c: In function 'handle_kamailioSrvFreeMemory':
kamailioServer.c:193:37: error: 'struct mem_info' has no member named
'free'
193 | int freememory = (int)_stats_shm_mi.free;
| ^
make[2]: *** [../../Makefile.rules:100: kamailioServer.o] Error 1
make[1]: *** [Makefile:511: modules] Error 1
changes introduced at fb8727b3e1b9fc4f4278809ef9cdea93e96ae77a
---
Modified: src/modules/snmpstats/kamailioServer.c
---
Diff:
https://github.com/kamailio/kamailio/commit/96efbdad0e9ed320657f56c3a0b4a5e…
Patch:
https://github.com/kamailio/kamailio/commit/96efbdad0e9ed320657f56c3a0b4a5e…
---
diff --git a/src/modules/snmpstats/kamailioServer.c
b/src/modules/snmpstats/kamailioServer.c
index 1bd7e70854..163c73f8b0 100644
--- a/src/modules/snmpstats/kamailioServer.c
+++ b/src/modules/snmpstats/kamailioServer.c
@@ -190,7 +190,7 @@ int handle_kamailioSrvFreeMemory(netsnmp_mib_handler *handler,
netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests)
{
stats_shm_update();
- int freememory = (int)_stats_shm_mi.free;
+ int freememory = (int)_stats_shm_mi.free_size;
switch(reqinfo->mode) {