[Pkg-voip-commits] [kamailio] 01/02: update upstream patches from 4.4 since 4.4.3

Victor Seva vseva at moszumanska.debian.org
Mon Sep 19 08:26:35 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 516952a8aa7f869760bd1cf165032e2e18f3493a
Author: Victor Seva <vseva at debian.org>
Date:   Mon Sep 19 09:37:15 2016 +0200

    update upstream patches from 4.4 since 4.4.3
---
 debian/patches/series                              |  1 +
 ...st-if-event-is-dialog-for-checking-termin.patch | 79 ++++++++++++++++++++++
 2 files changed, 80 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 9de40e1..a5ef5e0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+upstream/0001-presence-test-if-event-is-dialog-for-checking-termin.patch
 no_lib64_on_64_bits.patch
 no_INSTALL_file.patch
 fix_export.patch
diff --git a/debian/patches/upstream/0001-presence-test-if-event-is-dialog-for-checking-termin.patch b/debian/patches/upstream/0001-presence-test-if-event-is-dialog-for-checking-termin.patch
new file mode 100644
index 0000000..1b507e7
--- /dev/null
+++ b/debian/patches/upstream/0001-presence-test-if-event-is-dialog-for-checking-termin.patch
@@ -0,0 +1,79 @@
+From ce3d1dd8360567fdf2c8e36fbb4a4238dab8f036 Mon Sep 17 00:00:00 2001
+From: Daniel-Constantin Mierla <miconda at gmail.com>
+Date: Fri, 16 Sep 2016 22:22:57 +0200
+Subject: [PATCH] presence: test if event is dialog for checking terminated
+ state in presentity update
+
+- reported by Juha Heinanen
+
+(cherry picked from commit f2ef2a9016f41e97d3466b34b4039e66505d53a1)
+---
+ modules/presence/presentity.c | 35 +++++++++++++++++++----------------
+ 1 file changed, 19 insertions(+), 16 deletions(-)
+
+diff --git a/modules/presence/presentity.c b/modules/presence/presentity.c
+index b78f84a..b5d7b65 100644
+--- a/modules/presence/presentity.c
++++ b/modules/presence/presentity.c
+@@ -494,7 +494,7 @@ int get_dialog_state(presentity_t* presentity, char** state)
+ 	}
+ 
+ 	if (pa_dbf.query (pa_db, query_cols, query_ops, query_vals,
+-	 result_cols, n_query_cols, n_result_cols, 0, &result) < 0)
++				result_cols, n_query_cols, n_result_cols, 0, &result) < 0)
+ 	{
+ 		LM_ERR("unsuccessful sql query\n");
+ 		return -2;
+@@ -515,7 +515,8 @@ int get_dialog_state(presentity_t* presentity, char** state)
+ 		tmp_db_body.s = (char*)row_vals[rez_body_col].val.string_val;
+ 		tmp_db_body.len = strlen(tmp_db_body.s);
+ 
+-		parse_state_result = parse_dialog_state_from_body(tmp_db_body, &db_is_dialog, state);
++		parse_state_result = parse_dialog_state_from_body(tmp_db_body,
++				&db_is_dialog, state);
+ 
+ 		pa_dbf.free_result(pa_db, result);
+ 		result = NULL;
+@@ -966,23 +967,25 @@ after_dialog_check:
+ 		else
+ 			cur_etag= presentity->etag;
+ 
+-		if (is_dialog_terminated(presentity))
+-		{
+-			LM_WARN("Trying to update an already terminated state. Skipping update.\n");
+-
+-			/* send 200OK */
+-			if (publ_send200ok(msg, presentity->expires, cur_etag)< 0)
++		if (presentity->event->evp->type==EVENT_DIALOG) {
++			if(is_dialog_terminated(presentity))
+ 			{
+-				LM_ERR("sending 200OK reply\n");
+-				goto error;
+-			}
+-			if (sent_reply) *sent_reply= 1;
++				LM_WARN("Trying to update an already terminated state."
++						" Skipping update.\n");
+ 
+-			if(etag.s)
+-				pkg_free(etag.s);
+-			etag.s= NULL;
++				/* send 200OK */
++				if (publ_send200ok(msg, presentity->expires, cur_etag)< 0) {
++					LM_ERR("sending 200OK reply\n");
++					goto error;
++				}
++				if (sent_reply) *sent_reply= 1;
+ 
+-			goto done;
++				if(etag.s)
++					pkg_free(etag.s);
++				etag.s= NULL;
++
++				goto done;
++			}
+ 		}
+ 
+ 		update_keys[n_update_cols] = &str_expires_col;
+-- 
+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