From 4ba9ee6bff2fc74188c058f71240f1e128717588 Mon Sep 17 00:00:00 2001 From: Jason Penton Date: Fri, 30 Jan 2015 14:53:18 +0200 Subject: [PATCH 1/2] modules/tm: no reason to reset KR on continuation of async requests - maybe before continuing, a reply has been sent, request forwarded, etc... --- modules/tm/t_suspend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tm/t_suspend.c b/modules/tm/t_suspend.c index f07307d7525..8838a971455 100644 --- a/modules/tm/t_suspend.c +++ b/modules/tm/t_suspend.c @@ -221,7 +221,7 @@ int t_continue(unsigned int hash_index, unsigned int label, Not a huge problem, fr timer will fire, but CANCEL will not be sent. last_received will be set to 408. */ - reset_kr(); +// reset_kr(); /* fake the request and the environment, like in failure_route */ if (!fake_req(&faked_req, t->uas.request, 0 /* extra flags */, uac)) { From 102504294f9edaaee9d4baea873d4ed9151b8fed Mon Sep 17 00:00:00 2001 From: Charles Chance Date: Fri, 30 Jan 2015 14:08:01 +0000 Subject: [PATCH 2/2] dmq: do not parse From header again, since it was done already prior to cloning msg. - introduces a memory leak if not manually freed - but there is no need to parse it again anyway - discovered by Andrey Rybkin --- modules/dmq/worker.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/dmq/worker.c b/modules/dmq/worker.c index 8426730deda..ca1b3dcfe86 100644 --- a/modules/dmq/worker.c +++ b/modules/dmq/worker.c @@ -91,11 +91,11 @@ void worker_loop(int id) current_job = job_queue_pop(worker->queue); /* job_queue_pop might return NULL if queue is empty */ if(current_job) { - /* extract the from uri */ - if (parse_from_header(current_job->msg) < 0) { - LM_ERR("bad sip message or missing From hdr\n"); - } else { + /* attempt to identify node based on from uri */ + if (current_job->msg->from->parsed) { dmq_node = find_dmq_node_uri(node_list, &((struct to_body*)current_job->msg->from->parsed)->uri); + } else { + LM_ERR("bad sip message or missing From hdr\n"); } ret_value = current_job->f(current_job->msg, &peer_response, dmq_node);