[Pkg-voip-commits] [kamailio] 02/02: refresh upstream fixes from 4.4 branch since 4.4.2

Victor Seva vseva at moszumanska.debian.org
Mon Sep 5 06:16:15 UTC 2016


This is an automated email from the git hooks/post-receive script.

vseva pushed a commit to branch master
in repository kamailio.

commit e6d4bc678f741bf6c27ad9a51a3a15566d050238
Author: Victor Seva <vseva at debian.org>
Date:   Sun Sep 4 12:31:36 2016 +0200

    refresh upstream fixes from 4.4 branch since 4.4.2
---
 debian/patches/series                              |  5 ++
 ...21-tm-execut-cfg_update-inside-t_continue.patch | 37 +++++++++++
 ...c-init-cfg-framework-for-additional-proce.patch | 73 ++++++++++++++++++++++
 ...zoo-init-cfg-framework-in-child-processes.patch | 42 +++++++++++++
 ...client-don-t-stop-routing-script-executio.patch | 31 +++++++++
 ...0025-http_async_client-init-PV-API-sooner.patch | 68 ++++++++++++++++++++
 6 files changed, 256 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 35aa3b0..3f3b489 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -18,6 +18,11 @@ upstream/0017-dialog-open-db-connection-from-rpc-processes.patch
 upstream/0018-tm-check-branch-uri-against-current-uri-when-decidin.patch
 upstream/0019-rtpengine-init-rtp-engine-sockets-array-after-alloca.patch
 upstream/0020-rtpproxy-init-rtpproxy-sockets-array-after-allocatio.patch
+upstream/0021-tm-execut-cfg_update-inside-t_continue.patch
+upstream/0022-janssonrpc-c-init-cfg-framework-for-additional-proce.patch
+upstream/0023-kazoo-init-cfg-framework-in-child-processes.patch
+upstream/0024-http_async_client-don-t-stop-routing-script-executio.patch
+upstream/0025-http_async_client-init-PV-API-sooner.patch
 no_lib64_on_64_bits.patch
 no_INSTALL_file.patch
 fix_export.patch
diff --git a/debian/patches/upstream/0021-tm-execut-cfg_update-inside-t_continue.patch b/debian/patches/upstream/0021-tm-execut-cfg_update-inside-t_continue.patch
new file mode 100644
index 0000000..8e0ef34
--- /dev/null
+++ b/debian/patches/upstream/0021-tm-execut-cfg_update-inside-t_continue.patch
@@ -0,0 +1,37 @@
+From c86610943d5c84e0c6ae8fd9e8d40f29e936b4ea Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Wed, 13 Jul 2016 15:36:09 +0200
+Subject: [PATCH] tm: execut cfg_update() inside t_continue()
+
+- refresh the values changed inside cfg framework
+- reported by Victor Seva, GH #708
+
+(cherry picked from commit c7bec3320f6907c4edd8416a5e5cfa89b071a411)
+---
+ modules/tm/t_suspend.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/modules/tm/t_suspend.c b/modules/tm/t_suspend.c
+index e8096bb..6bb2547 100644
+--- a/modules/tm/t_suspend.c
++++ b/modules/tm/t_suspend.c
+@@ -22,6 +22,7 @@
+ #include "../../action.h"
+ #include "../../script_cb.h"
+ #include "../../dset.h"
++#include "../../cfg/cfg_struct.h"
+ 
+ #include "config.h"
+ #include "sip_msg.h"
+@@ -178,6 +179,8 @@ int t_continue(unsigned int hash_index, unsigned int label,
+ 	struct hdr_field *hdr, *prev = 0, *tmp = 0;
+ 	int route_type_bk;
+ 
++	cfg_update();
++
+ 	if (t_lookup_ident(&t, hash_index, label) < 0) {
+ 		LM_ERR("transaction not found\n");
+ 		return -1;
+-- 
+2.9.3
+
diff --git a/debian/patches/upstream/0022-janssonrpc-c-init-cfg-framework-for-additional-proce.patch b/debian/patches/upstream/0022-janssonrpc-c-init-cfg-framework-for-additional-proce.patch
new file mode 100644
index 0000000..765a81b
--- /dev/null
+++ b/debian/patches/upstream/0022-janssonrpc-c-init-cfg-framework-for-additional-proce.patch
@@ -0,0 +1,73 @@
+From 12777af81509e3f6aa3e88c6aacb8844403d1e0b Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Wed, 13 Jul 2016 16:03:32 +0200
+Subject: [PATCH] janssonrpc-c: init cfg framework for additional process
+
+- revealed by GH #708
+
+(cherry picked from commit 5d8d565331111b80d72a20d19f2bcb14ea6301a4)
+---
+ modules/janssonrpc-c/janssonrpc_io.c  | 8 +++++++-
+ modules/janssonrpc-c/janssonrpc_mod.c | 2 ++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/modules/janssonrpc-c/janssonrpc_io.c b/modules/janssonrpc-c/janssonrpc_io.c
+index 1e1a82b..ed0be6c 100644
+--- a/modules/janssonrpc-c/janssonrpc_io.c
++++ b/modules/janssonrpc-c/janssonrpc_io.c
+@@ -39,6 +39,7 @@
+ #include "../../action.h"
+ #include "../../route_struct.h"
+ #include "../../lvalue.h"
++#include "../../cfg/cfg_struct.h"
+ #include "../../rand/fastrand.h"
+ #include "../tm/tm_load.h"
+ #include "../jansson/jansson_utils.h"
+@@ -57,11 +58,15 @@ void io_shutdown(int sig);
+ 
+ int jsonrpc_io_child_process(int cmd_pipe)
+ {
++	struct event* pipe_ev = NULL;
++
+ 	global_ev_base = event_base_new();
+ 	global_evdns_base = evdns_base_new(global_ev_base, 1);
+ 
+ 	set_non_blocking(cmd_pipe);
+-	struct event* pipe_ev = event_new(global_ev_base, cmd_pipe, EV_READ | EV_PERSIST, cmd_pipe_cb, NULL);
++	pipe_ev = event_new(global_ev_base, cmd_pipe,
++			EV_READ | EV_PERSIST, cmd_pipe_cb, NULL);
++
+ 	if(!pipe_ev) {
+ 		ERR("Failed to create pipe event\n");
+ 		return -1;
+@@ -449,6 +454,7 @@ void cmd_pipe_cb(int fd, short event, void *arg)
+ 		return;
+ 	}
+ 
++	cfg_update();
+ 
+ 	switch(cmd->type) {
+ 	case CMD_CLOSE:
+diff --git a/modules/janssonrpc-c/janssonrpc_mod.c b/modules/janssonrpc-c/janssonrpc_mod.c
+index 7db22cc..c69b843 100644
+--- a/modules/janssonrpc-c/janssonrpc_mod.c
++++ b/modules/janssonrpc-c/janssonrpc_mod.c
+@@ -29,6 +29,7 @@
+ #include "../../trim.h"
+ #include "../../sr_module.h"
+ #include "../../timer_proc.h"
++#include "../../cfg/cfg_struct.h"
+ #include "../tm/tm_load.h"
+ #include "../jansson/jansson_utils.h"
+ 
+@@ -194,6 +195,7 @@ static int child_init(int rank)
+ 		return -1; /* error */
+ 	if(pid==0){
+ 		/* child */
++		if (cfg_child_init()) return -1;
+ 		close(pipe_fds[1]);
+ 		return jsonrpc_io_child_process(pipe_fds[0]);
+ 	}
+-- 
+2.9.3
+
diff --git a/debian/patches/upstream/0023-kazoo-init-cfg-framework-in-child-processes.patch b/debian/patches/upstream/0023-kazoo-init-cfg-framework-in-child-processes.patch
new file mode 100644
index 0000000..d3a67ad
--- /dev/null
+++ b/debian/patches/upstream/0023-kazoo-init-cfg-framework-in-child-processes.patch
@@ -0,0 +1,42 @@
+From ab9403494300d5a07a7fe307c3666df8dbc23847 Mon Sep 17 00:00:00 2001
+From: lazedo <luis.azedo at factorlusitano.com>
+Date: Sat, 6 Aug 2016 12:41:14 +0100
+Subject: [PATCH] kazoo: init cfg framework in child processes
+
+fixes crashing since commit c7bec3320f6907c4edd8416a5e5cfa89b071a411
+(cherry picked from commit d63869cd31a0ac0a61f218b3144de7a9f400e0ae)
+---
+ modules/kazoo/kazoo.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/modules/kazoo/kazoo.c b/modules/kazoo/kazoo.c
+index 28c97bd..060242d 100644
+--- a/modules/kazoo/kazoo.c
++++ b/modules/kazoo/kazoo.c
+@@ -393,6 +393,7 @@ static int mod_child_init(int rank)
+ 			if (pid<0)
+ 				return -1; /* error */
+ 			if(pid==0){
++				if (cfg_child_init()) return -1;
+ 				close(kz_worker_pipes_fds[i*2+1]);
+ 				return(kz_amqp_consumer_worker_proc(kz_worker_pipes_fds[i*2]));
+ 			}
+@@ -406,6 +407,7 @@ static int mod_child_init(int rank)
+ 					if (pid<0)
+ 						return -1; /* error */
+ 					if(pid==0){
++						if (cfg_child_init()) return -1;
+ 						return(kz_amqp_consumer_proc(s));
+ 					}
+ 				}
+@@ -416,6 +418,7 @@ static int mod_child_init(int rank)
+ 		if (pid<0)
+ 			return -1; /* error */
+ 		if(pid==0){
++			if (cfg_child_init()) return -1;
+ 			close(kz_cmd_pipe_fds[1]);
+ 			kz_amqp_publisher_proc(kz_cmd_pipe_fds[0]);
+ 		}
+-- 
+2.9.3
+
diff --git a/debian/patches/upstream/0024-http_async_client-don-t-stop-routing-script-executio.patch b/debian/patches/upstream/0024-http_async_client-don-t-stop-routing-script-executio.patch
new file mode 100644
index 0000000..8cb3bb5
--- /dev/null
+++ b/debian/patches/upstream/0024-http_async_client-don-t-stop-routing-script-executio.patch
@@ -0,0 +1,31 @@
+From 384e9006469ed0176dce922eb49e133c969975e3 Mon Sep 17 00:00:00 2001
+From: Federico Cabiddu <federico.cabiddu at gmail.com>
+Date: Fri, 12 Aug 2016 14:36:27 +0200
+Subject: [PATCH] http_async_client: don't stop routing script execution for a
+ POST query if transaction is not suspended
+
+(cherry picked from commit eb6b48f03b794ba7430e50b47402ba9cf091f96d)
+---
+ modules/http_async_client/http_async_client_mod.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/modules/http_async_client/http_async_client_mod.c b/modules/http_async_client/http_async_client_mod.c
+index 0ea2923..965129d 100644
+--- a/modules/http_async_client/http_async_client_mod.c
++++ b/modules/http_async_client/http_async_client_mod.c
+@@ -496,11 +496,7 @@ static int w_http_async_post(sip_msg_t *msg, char *query, char* post, char* rt)
+ 		return -1;
+ 	}
+ 
+-	if(async_send_query(msg, &sdata, &post_data, act)<0)
+-		return -1;
+-
+-	/* force exit in config */
+-	return 0;
++	return async_send_query(msg, &sdata, &post_data, act);
+ }
+ 
+ #define _IVALUE_ERROR(NAME) LM_ERR("invalid parameter '" #NAME "' (must be a number)\n")
+-- 
+2.9.3
+
diff --git a/debian/patches/upstream/0025-http_async_client-init-PV-API-sooner.patch b/debian/patches/upstream/0025-http_async_client-init-PV-API-sooner.patch
new file mode 100644
index 0000000..e1f4f7e
--- /dev/null
+++ b/debian/patches/upstream/0025-http_async_client-init-PV-API-sooner.patch
@@ -0,0 +1,68 @@
+From 7164e5d3d587149e03c7ad69feb3e9139ac30757 Mon Sep 17 00:00:00 2001
+From: Camille Oudot <camille.oudot at orange.com>
+Date: Tue, 30 Aug 2016 11:43:26 +0200
+Subject: [PATCH] http_async_client: init PV API sooner
+
+fixes #760
+
+(cherry picked from commit 597242dfbfd883d136aa49d88266fc9edb6b8e09)
+---
+ modules/http_async_client/http_async_client_mod.c | 21 +++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/modules/http_async_client/http_async_client_mod.c b/modules/http_async_client/http_async_client_mod.c
+index 965129d..ddbd882 100644
+--- a/modules/http_async_client/http_async_client_mod.c
++++ b/modules/http_async_client/http_async_client_mod.c
+@@ -54,6 +54,7 @@
+ #include "../../modules/tm/tm_load.h"
+ #include "../../modules/pv/pv_api.h"
+ 
++
+ #include "async_http.h"
+ 
+ MODULE_VERSION
+@@ -227,6 +228,18 @@ struct module_exports exports = {
+ };
+ 
+ 
++int mod_register(char *path, int *dlflags, void *p1, void *p2)
++{
++	pv_register_api_t pvra;
++
++	pvra = (pv_register_api_t)find_export("pv_register_api", NO_SCRIPT, 0);
++	if (!pvra) {
++		LM_ERR("Cannot import pv functions (pv module must be loaded before this module)\n");
++		return -1;
++	}
++	pvra(&pv_api);
++	return 0;
++}
+ 
+ /**
+  * init module function
+@@ -234,7 +247,6 @@ struct module_exports exports = {
+ static int mod_init(void)
+ {
+ 	unsigned int n;
+-	pv_register_api_t pvra;
+ 	LM_INFO("Initializing Http Async module\n");
+ 
+ #ifdef STATISTICS
+@@ -304,13 +316,6 @@ static int mod_init(void)
+ 		memset(&tmb, 0, sizeof(tm_api_t));
+ 	}
+ 
+-	pvra = (pv_register_api_t)find_export("pv_register_api", NO_SCRIPT, 0);
+-	if (!pvra) {
+-		LM_ERR("Cannot import pv functions (pv module must be loaded before this module)\n");
+-		return -1;
+-	}
+-	pvra(&pv_api);
+-
+ 	/* allocate workers array */
+ 	workers = shm_malloc(num_workers * sizeof(*workers));
+ 	if(workers == NULL) {
+-- 
+2.9.3
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/kamailio.git



More information about the Pkg-voip-commits mailing list