Module: sip-router
Branch: master
Commit: 78c8eb1fa4b118661262fd6add9a0e9f60ca8cd1
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=78c8eb1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Mar 2 09:51:40 2014 +0100
tm: execute FAILURE_CB_TYPE callbacks for resuming suspended request
- suspended request creates the transaction and a branch, callbacks
cannot executed anymore for request and branch route execution
- otherwise it results in crashes, reported by FS#400 and FS#404
---
modules/tm/t_suspend.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/tm/t_suspend.c b/modules/tm/t_suspend.c
index 789d25a..b22e3be 100644
--- a/modules/tm/t_suspend.c
+++ b/modules/tm/t_suspend.c
@@ -166,6 +166,7 @@ int t_continue(unsigned int hash_index, unsigned int label,
int branch;
struct ua_client *uac =NULL;
int ret;
+ int cb_type;
if (t_lookup_ident(&t, hash_index, label) < 0) {
LOG(L_ERR, "ERROR: t_continue: transaction not found\n");
@@ -189,10 +190,10 @@ int t_continue(unsigned int hash_index, unsigned int label,
* that we are executing post a suspend */
/* which route block type were we in when we were suspended */
- int cb_type = REQUEST_CB_TYPE;
+ cb_type = FAILURE_CB_TYPE;;
switch (t->async_backup.backup_route) {
case REQUEST_ROUTE:
- cb_type = REQUEST_CB_TYPE;
+ cb_type = FAILURE_CB_TYPE;
break;
case FAILURE_ROUTE:
cb_type = FAILURE_CB_TYPE;
@@ -201,7 +202,7 @@ int t_continue(unsigned int hash_index, unsigned int label,
cb_type = ONREPLY_CB_TYPE;
break;
case BRANCH_ROUTE:
- cb_type = BRANCH_CB_TYPE;
+ cb_type = FAILURE_CB_TYPE;
break;
}