Module: sip-router
Branch: master
Commit: 7718bd4d601526179fc82df683d1e2b0af0b837b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7718bd4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu May 28 15:26:36 2009 +0300
tm: mark first branch in a fwd step
- a flag is used to mark the uac_client that is first in current
destination set
---
modules/tm/h_table.h | 1 +
modules/tm/t_fwd.c | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/modules/tm/h_table.h b/modules/tm/h_table.h
index dd18820..d6c36e4 100644
--- a/modules/tm/h_table.h
+++ b/modules/tm/h_table.h
@@ -199,6 +199,7 @@ typedef struct ua_server
/* UAC internal flags */
#define TM_UAC_FLAG_RR 1 /* Record-Route applied */
#define TM_UAC_FLAG_R2 2 /* 2nd Record-Route applied */
+#define TM_UAC_FLAG_FB 4 /* Mark first entry in new branch set */
#endif
typedef struct ua_client
diff --git a/modules/tm/t_fwd.c b/modules/tm/t_fwd.c
index 97b36c2..01a3699 100644
--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -1115,6 +1115,12 @@ int t_forward_nonack( struct cell *t, struct sip_msg* p_msg ,
ser_error=lowest_ret;
return lowest_ret;
}
+
+#ifdef TM_UAC_FLAGS
+ /* mark the fist branch in this fwd step */
+ t->uac[first_branch].flags |= TM_UAC_FLAG_FB;
+#endif
+
ser_error=0; /* clear branch adding errors */
/* send them out now */
success_branch=0;