mirror of https://github.com/sipwise/kamailio.git
Apply upstream patch 7da9a0a5da047ec2258f722a99447e06b5851dc8 Change-Id: Id8363e499211f3c9feb731d803dbe336e4134b90master
parent
33ba3d7aa3
commit
383626e909
@ -0,0 +1,32 @@
|
||||
--- a/src/modules/tm/t_lookup.c
|
||||
+++ b/src/modules/tm/t_lookup.c
|
||||
@@ -2057,7 +2057,7 @@ int t_unref(struct sip_msg *p_msg)
|
||||
return -1;
|
||||
if(p_msg->first_line.type == SIP_REQUEST) {
|
||||
kr = get_kr();
|
||||
- if(unlikely(kr == REQ_ERR_DELAYED)) {
|
||||
+ if(unlikely(kr & REQ_ERR_DELAYED)) {
|
||||
LM_DBG("delayed error reply generation(%d)\n", tm_error);
|
||||
if(unlikely(is_route_type(FAILURE_ROUTE))) {
|
||||
LM_BUG("called w/ kr=REQ_ERR_DELAYED in failure"
|
||||
@@ -2074,15 +2074,12 @@ int t_unref(struct sip_msg *p_msg)
|
||||
&& !(kr & REQ_RLSD)))) {
|
||||
LM_WARN("script writer didn't release transaction\n");
|
||||
t_release_transaction(T);
|
||||
- } else if(unlikely((kr & REQ_ERR_DELAYED)
|
||||
- && (kr
|
||||
- & ~(REQ_RLSD | REQ_RPLD | REQ_ERR_DELAYED
|
||||
- | REQ_FWDED)))) {
|
||||
- LM_BUG("REQ_ERR DELAYED should have been caught much"
|
||||
- " earlier for %p: %d (hex %x)\n",
|
||||
- T, kr, kr);
|
||||
+ } else if(unlikely(T->nr_of_outgoings == 0
|
||||
+ && !(T->flags & T_IN_AGONY))) {
|
||||
+ LM_WARN("dropping orphaned transaction without branches"
|
||||
+ " T=%p kr=%d\n", T, kr);
|
||||
t_release_transaction(T);
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
tm_error = 0; /* clear it */
|
||||
UNREF(T);
|
||||
Loading…
Reference in new issue