diff options
| author | Jiri Slachta <jiri@slachta.eu> | 2020-09-23 11:31:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-23 11:31:04 +0200 |
| commit | e80afb1545e2da181b8b7b1f89555b79d95bbc73 (patch) | |
| tree | 9b8234ec4ceb43a11b19ccaa8528c0d1823a187e /net | |
| parent | 13060e85c092ba2f8c8b343f72ff222154e6d98e (diff) | |
| parent | 37c411269b05e211ca417407cef85dd8e2745fbc (diff) | |
Merge pull request #575 from guidosarducci/master-add-siproxd-max-clients
siproxd: add max clients configuration and default
Diffstat (limited to 'net')
| -rw-r--r-- | net/siproxd/Makefile | 32 | ||||
| -rw-r--r-- | net/siproxd/patches/005-reduce-rtpproxy-urlmap-size.patch | 19 |
2 files changed, 29 insertions, 22 deletions
diff --git a/net/siproxd/Makefile b/net/siproxd/Makefile index 30a4c11..d16c040 100644 --- a/net/siproxd/Makefile +++ b/net/siproxd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=siproxd PKG_VERSION:=0.8.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/siproxd @@ -19,6 +19,8 @@ PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_CONFIG_DEPENDS:=CONFIG_SIPROXD_MAX_CLIENTS + PKG_LICENSE:=GPL-2.0+ PKG_LICENSE_FILES:=COPYING @@ -46,14 +48,37 @@ define Package/siproxd/conffiles /etc/config/siproxd endef +define Package/siproxd/config + config SIPROXD_MAX_CLIENTS + int "Max supported clients" + default 32 + depends on PACKAGE_siproxd + help + Default 32 is sufficient for home environments. Larger values + consume more memory (e.g. RSS of 17 MB with upstream default 512). +endef + CONFIGURE_ARGS+= \ --with-libosip-prefix="$(STAGING_DIR)/usr" \ - --disable-ltdl-convenience \ + --without-included-ltdl \ --disable-doc MAKE_FLAGS+= \ SUBDIRS="src scripts contrib" +TARGET_CFLAGS+= \ + -Wno-unused-const-variable + +URLMAP:=$(CONFIG_SIPROXD_MAX_CLIENTS) +RTPPROXY:=$(shell expr $(URLMAP) \* 2) + +define Build/Configure + $(call Build/Configure/Default) + $(ESED) 's;^(#define[[:space:]]+URLMAP_SIZE).*$$$$;\1 $(URLMAP);' \ + -e 's;^(#define[[:space:]]+RTPPROXY_SIZE).*$$$$;\1 $(RTPPROXY);' \ + $(PKG_BUILD_DIR)/src/siproxd.h +endef + define Package/siproxd/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/siproxd $(1)/usr/sbin @@ -72,7 +97,8 @@ define BuildPlugin define Package/siproxd-mod-$(subst _,-,$(1))/install $(INSTALL_DIR) $$(1)/usr/lib/siproxd - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/siproxd/plugin_$(1).so $$(1)/usr/lib/siproxd + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/siproxd/plugin_$(1).so \ + $$(1)/usr/lib/siproxd endef $$(eval $$(call BuildPackage,siproxd-mod-$(subst _,-,$(1)))) diff --git a/net/siproxd/patches/005-reduce-rtpproxy-urlmap-size.patch b/net/siproxd/patches/005-reduce-rtpproxy-urlmap-size.patch deleted file mode 100644 index 43587c5..0000000 --- a/net/siproxd/patches/005-reduce-rtpproxy-urlmap-size.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -urN siproxd-0.8.3/src/siproxd.h siproxd-0.8.3-patch/src/siproxd.h ---- siproxd-0.8.3/src/siproxd.h 2019-11-09 09:42:04.000000000 -0800 -+++ siproxd-0.8.3-patch/src/siproxd.h 2020-09-04 20:02:47.961246801 -0700 -@@ -282,13 +282,13 @@ - #define TCP_IDLE_TO 300 /* TCP connection idle timeout in seconds */ - #define TCP_CONNECT_TO 500 /* TCP connect() timeout in msec */ - --#define URLMAP_SIZE 512 /* number of URL mapping table entries */ -+#define URLMAP_SIZE 128 /* number of URL mapping table entries */ - /* this limits the number of clients! */ - - #define SOURCECACHE_SIZE 256 /* number of return addresses */ - #define DEJITTERLIMIT 1500000 /* max value for dejitter configuration */ - --#define RTPPROXY_SIZE 1024 /* number of rtp proxy entries */ -+#define RTPPROXY_SIZE 256 /* number of rtp proxy entries */ - /* this limits the number of calls! */ - - #define BUFFER_SIZE 8196 /* input buffer for read from socket */ |
