diff --git a/debian/patches/series b/debian/patches/series index 827b7f087..69c74a4a7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -20,6 +20,7 @@ upstream/pv-new-function-pv_evalx-dst-fmt.patch upstream/pv_trans_cfg_line.patch upstream/dialog-check-if-dialog-exists-after-event-route-exec.patch upstream/dialog-more-safety-checks-to-detect-if-dialog-is-gon.patch +upstream/core-fix-mem_summary-comparation-when-SIGUSR1-is-rec.patch # ## no_lib64_on_64_bits.patch diff --git a/debian/patches/upstream/core-fix-mem_summary-comparation-when-SIGUSR1-is-rec.patch b/debian/patches/upstream/core-fix-mem_summary-comparation-when-SIGUSR1-is-rec.patch new file mode 100644 index 000000000..0e4437515 --- /dev/null +++ b/debian/patches/upstream/core-fix-mem_summary-comparation-when-SIGUSR1-is-rec.patch @@ -0,0 +1,58 @@ +From: Victor Seva +Date: Tue, 23 May 2017 18:07:54 +0200 +Subject: core: fix mem_summary comparation when SIGUSR1 is received + +>From http://www.kamailio.org/wiki/cookbooks/4.4.x/core#mem_summary + 1 - dump all the pkg used blocks (status) + 2 - dump all the shm used blocks (status) + 4 - summary of pkg used blocks + 8 - summary of shm used blocks +--- + main.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/main.c b/main.c +index 8b2e8e8..b6f68df 100644 +--- a/main.c ++++ b/main.c +@@ -709,7 +709,7 @@ void handle_sigs(void) + LOG(memlog, "Memory status (pkg):\n"); + pkg_status(); + } +- if (cfg_get(core, core_cfg, mem_summary) & 2) { ++ if (cfg_get(core, core_cfg, mem_summary) & 4) { + LOG(memlog, "Memory still-in-use summary (pkg):\n"); + pkg_sums(); + } +@@ -717,11 +717,11 @@ void handle_sigs(void) + #endif + #ifdef SHM_MEM + if (memlog <= cfg_get(core, core_cfg, debug)){ +- if (cfg_get(core, core_cfg, mem_summary) & 1) { ++ if (cfg_get(core, core_cfg, mem_summary) & 2) { + LOG(memlog, "Memory status (shm):\n"); + shm_status(); + } +- if (cfg_get(core, core_cfg, mem_summary) & 2) { ++ if (cfg_get(core, core_cfg, mem_summary) & 8) { + LOG(memlog, "Memory still-in-use summary (shm):\n"); + shm_sums(); + } +@@ -821,7 +821,7 @@ void sig_usr(int signo) + LOG(memlog, "Memory status (pkg):\n"); + pkg_status(); + } +- if (cfg_get(core, core_cfg, mem_summary) & 2) { ++ if (cfg_get(core, core_cfg, mem_summary) & 4) { + LOG(memlog, "Memory still-in-use summary (pkg):" + "\n"); + pkg_sums(); +@@ -840,7 +840,7 @@ void sig_usr(int signo) + LOG(memlog, "Memory status (pkg):\n"); + pkg_status(); + } +- if (cfg_get(core, core_cfg, mem_summary) & 2) { ++ if (cfg_get(core, core_cfg, mem_summary) & 4) { + LOG(memlog, "Memory still-in-use summary (pkg):\n"); + pkg_sums(); + }