[sr-dev] git:kamailio_3.0: tm: TMCB_E2EACK callback fix

Andrei Pelinescu-Onciul andrei at iptel.org
Fri May 28 21:29:37 CEST 2010


Module: sip-router
Branch: kamailio_3.0
Commit: 45fb6e4f1000de253d19e08d86699ea865d120f9
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=45fb6e4f1000de253d19e08d86699ea865d120f9

Author: Miklos Tirpak <miklos at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Wed Nov 11 12:24:50 2009 +0100

tm: TMCB_E2EACK callback fix

TMCB_E2EACK_RETR_IN was called instead of TMCB_E2EACK_IN
for the initial e2e-ACK message.
(cherry picked from commit 3da5ebc8bdc3530d1c61b84665e4dadf6c6cb3e9)

---

 modules/tm/t_reply.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 69d22a2..d740c4c 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -274,9 +274,9 @@ int unmatched_totag(struct cell *t, struct sip_msg *ack)
 		if (i->tag.len==tag->len
 				&& memcmp(i->tag.s, tag->s, tag->len)==0) {
 			DBG("DEBUG: totag for e2e ACK found: %d\n", i->acked);
-			/* mark totag as acked and return 0 if this was the first ack
-			 * and 1 otherwise */
-			return atomic_get_and_set_int(&i->acked, 1);
+			/* mark totag as acked and return 1 if this was the first ack
+			 * and 0 otherwise */
+			return (atomic_get_and_set_int(&i->acked, 1)==0);
 		}
 		i=i->next;
 	}




More information about the sr-dev mailing list