[sr-dev] git:master:25aeed98: core: allow setting shm_mem_size in cfg if it still holds default value

Daniel-Constantin Mierla miconda at gmail.com
Thu Jan 26 17:11:50 CET 2017


Module: kamailio
Branch: master
Commit: 25aeed98a773fb796de47703a72532e5c0345f6c
URL: https://github.com/kamailio/kamailio/commit/25aeed98a773fb796de47703a72532e5c0345f6c

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-01-26T17:02:05+01:00

core: allow setting shm_mem_size in cfg if it still holds default value

- reported by Maxim Malygin, GH #950

---

Modified: src/core/cfg.y

---

Diff:  https://github.com/kamailio/kamailio/commit/25aeed98a773fb796de47703a72532e5c0345f6c.diff
Patch: https://github.com/kamailio/kamailio/commit/25aeed98a773fb796de47703a72532e5c0345f6c.patch

---

diff --git a/src/core/cfg.y b/src/core/cfg.y
index f92559a..1326177 100644
--- a/src/core/cfg.y
+++ b/src/core/cfg.y
@@ -1436,7 +1436,7 @@ assign_stm:
 		if (shm_initialized())
 			yyerror("shm/shm_mem_size must be before any modparam or the"
 					" route blocks");
-		else if (shm_mem_size == 0)
+		else if (shm_mem_size == 0 || shm_mem_size == SHM_MEM_POOL_SIZE)
 			shm_mem_size=$3 * 1024 * 1024;
 	}
 	| SHM_MEM_SZ EQUAL error { yyerror("number expected"); }




More information about the sr-dev mailing list