From: Sebastian Kemper Date: Thu, 3 Aug 2017 19:15:59 +0000 (+0200) Subject: asterisk-11.x and asterisk-13.x: Disable LOW_MEMORY by default X-Git-Url: http://git.openwrt.org/?p=feed%2Ftelephony.git;a=commitdiff_plain;h=ec6991c01cf141db172bd5bc30a3e18cb9174208 asterisk-11.x and asterisk-13.x: Disable LOW_MEMORY by default In issue #173 a segmentation fault occuring during a simple SIP call was reported. Compiling with LOW_MEMORY disabled the reproducible segfault disappeared. This commits adds a switch for LOW_MEMORY. Default is off. If anybody wants to debug the segfault s/he can enable it. The segfault was reported for Asterisk 11. Disable LOW_MEMORY on Asterisk 13 anyway, better safe than sorry. Signed-off-by: Sebastian Kemper --- diff --git a/net/asterisk-11.x/Config.in b/net/asterisk-11.x/Config.in new file mode 100644 index 0000000..38e2c47 --- /dev/null +++ b/net/asterisk-11.x/Config.in @@ -0,0 +1,11 @@ +menu "Advanced configuration" + depends on PACKAGE_asterisk11 + +config ASTERISK11_LOW_MEMORY + bool "Optimize Asterisk 11 for low memory usage" + default n + help + Warning: this feature is known to cause problems with some modules. + Disable it if you experience problems like segmentation faults. + +endmenu diff --git a/net/asterisk-11.x/Makefile b/net/asterisk-11.x/Makefile index e9349cd..395c7b0 100644 --- a/net/asterisk-11.x/Makefile +++ b/net/asterisk-11.x/Makefile @@ -51,6 +51,10 @@ define Package/asterisk11/install/sounds $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/$(2) $(1)/usr/lib/asterisk/sounds/ endef +define Package/$(PKG_NAME)/config + source "$(SOURCE)/Config.in" +endef + define BuildAsterisk11Module define Package/asterisk11-$(1) $$(call Package/asterisk11/Default) @@ -327,7 +331,7 @@ define Build/Compile cd "$(PKG_BUILD_DIR)" && \ ./menuselect/menuselect \ --disable BUILD_NATIVE \ - --enable LOW_MEMORY \ + $(if $(CONFIG_ASTERISK11_LOW_MEMORY),--enable LOW_MEMORY) \ menuselect.makeopts $(MAKE) -C "$(PKG_BUILD_DIR)" include/asterisk/version.h \ include/asterisk/buildopts.h defaults.h \ diff --git a/net/asterisk-13.x/Config.in b/net/asterisk-13.x/Config.in new file mode 100644 index 0000000..fd38585 --- /dev/null +++ b/net/asterisk-13.x/Config.in @@ -0,0 +1,11 @@ +menu "Advanced configuration" + depends on PACKAGE_asterisk13 + +config ASTERISK13_LOW_MEMORY + bool "Optimize Asterisk 13 for low memory usage" + default n + help + Warning: this feature is known to cause problems with some modules. + Disable it if you experience problems like segmentation faults. + +endmenu diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile index e0bb479..f7b59f3 100644 --- a/net/asterisk-13.x/Makefile +++ b/net/asterisk-13.x/Makefile @@ -52,6 +52,10 @@ define Package/asterisk13/install/sounds $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/$(2) $(1)/usr/lib/asterisk/sounds/ endef +define Package/$(PKG_NAME)/config + source "$(SOURCE)/Config.in" +endef + define BuildAsterisk13Module define Package/asterisk13-$(1) $$(call Package/asterisk13/Default) @@ -269,7 +273,7 @@ define Build/Compile cd "$(PKG_BUILD_DIR)" && \ ./menuselect/menuselect \ --disable BUILD_NATIVE \ - --enable LOW_MEMORY \ + $(if $(CONFIG_ASTERISK13_LOW_MEMORY),--enable LOW_MEMORY) \ menuselect.makeopts $(MAKE) -C "$(PKG_BUILD_DIR)" \ include/asterisk/version.h \