Merge pull request #567 from guidosarducci/master-update-siproxd-0.8.3

siproxd: update to version 0.8.3, improve logging and memory usage
This commit is contained in:
Jiri Slachta 2020-09-06 21:58:44 +02:00 committed by GitHub
commit cf378bd959
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 49 deletions

View file

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=siproxd
PKG_VERSION:=0.8.2
PKG_RELEASE:=6
PKG_VERSION:=0.8.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/siproxd
PKG_HASH:=526ce491b0cc189e2766c62432aff3ebb995e551d7261ea32c02a90c7bf7ccd0
PKG_HASH:=9a6d7a6bb6fff162775b1e1fb7018de9c69642cbf8626185dc6ffceeeba07736
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
@ -67,7 +67,7 @@ define BuildPlugin
define Package/siproxd-mod-$(subst _,-,$(1))
$$(call Package/siproxd/Default)
TITLE:= siproxd $(1) plugin
DEPENDS:=siproxd
DEPENDS:=siproxd $(2)
endef
define Package/siproxd-mod-$(subst _,-,$(1))/install
@ -79,6 +79,7 @@ define BuildPlugin
endef
$(eval $(call BuildPackage,siproxd))
$(eval $(call BuildPlugin,blacklist,+libsqlite3))
$(eval $(call BuildPlugin,codecfilter))
$(eval $(call BuildPlugin,defaulttarget))
$(eval $(call BuildPlugin,demo))
@ -89,6 +90,7 @@ $(eval $(call BuildPlugin,logcall))
$(eval $(call BuildPlugin,prefix))
$(eval $(call BuildPlugin,regex))
$(eval $(call BuildPlugin,shortdial))
$(eval $(call BuildPlugin,stats))
$(eval $(call BuildPlugin,stripheader))
$(eval $(call BuildPlugin,stun))
$(eval $(call BuildPlugin,siptrunk))

View file

@ -110,7 +110,6 @@ section_end() {
procd_set_param command "$PROG" --config "$conf_file"
procd_set_param pidfile "$pid_file"
procd_set_param respawn
procd_set_param stderr 1
procd_add_jail siproxd log
procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /dev/null
procd_add_jail_mount "$conf_file"

View file

@ -0,0 +1,19 @@
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 */

View file

@ -1,20 +0,0 @@
--- a/src/log.c
+++ b/src/log.c
@@ -77,7 +77,7 @@
static pthread_mutex_t log_mutex = PTHREAD_MUTEX_INITIALIZER;
void log_init(void) {
- openlog(NULL,LOG_NDELAY|LOG_PID,LOG_DAEMON);
+ openlog("siproxd",LOG_NDELAY|LOG_PID,LOG_DAEMON);
}
void log_end(void) {
@@ -257,7 +257,7 @@
va_copy(ap_copy, ap);
vsnprintf(outbuf, sizeof(outbuf), format, ap_copy);
va_end(ap_copy);
- syslog(LOG_USER|level, "%s:%i %s%s", file, line, label, outbuf);
+ syslog(LOG_DAEMON|level, "%s:%i %s%s", file, line, label, outbuf);
return;
}

View file

@ -1,11 +0,0 @@
--- a/src/accessctl.c
+++ b/src/accessctl.c
@@ -34,7 +34,7 @@
static char const ident[]="$Id: accessctl.c 521 2015-09-13 08:43:04Z hb9xar $";
/* configuration storage */
-struct siproxd_config configuration;
+extern struct siproxd_config configuration;
/*

View file

@ -1,13 +0,0 @@
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -28,8 +28,10 @@
#include <arpa/nameser_compat.h>
#endif
+#include <stdio.h>
#include <resolv.h>
#include <string.h>
+#include <sys/types.h>
#include "log.h"