[sr-dev] git:hpw/branch_failure_route: core: Add defines required for a new branch_failure_route type

Hugh Waite hugh.waite at crocodile-rcs.com
Tue Mar 26 15:02:56 CET 2013


Module: sip-router
Branch: hpw/branch_failure_route
Commit: 0b79baecf4a36a47522fd222614e370c5d044e8f
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0b79baecf4a36a47522fd222614e370c5d044e8f

Author: Hugh Waite <hugh.waite at crocodile-rcs.com>
Committer: Hugh Waite <hugh.waite at crocodile-rcs.com>
Date:   Tue Mar 26 11:43:35 2013 +0000

core: Add defines required for a new branch_failure_route type

---

 route.h     |    1 +
 script_cb.c |    2 +-
 script_cb.h |    4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/route.h b/route.h
index 8f25fe3..8cdcd2a 100644
--- a/route.h
+++ b/route.h
@@ -53,6 +53,7 @@
 #define ERROR_ROUTE   (1 << 5)
 #define LOCAL_ROUTE   (1 << 6)
 #define CORE_ONREPLY_ROUTE (1 << 7)
+#define BRANCH_FAILURE_ROUTE (1 << 8)
 #define ONREPLY_ROUTE (TM_ONREPLY_ROUTE|CORE_ONREPLY_ROUTE)
 #define EVENT_ROUTE   REQUEST_ROUTE
 #define ANY_ROUTE     (0xFFFFFFFF)
diff --git a/script_cb.c b/script_cb.c
index a10df7d..fe17819 100644
--- a/script_cb.c
+++ b/script_cb.c
@@ -53,7 +53,7 @@
 #include "mem/mem.h"
 
 /* Number of cb types = last cb type */
-#define SCRIPT_CB_NUM	EVENT_CB_TYPE
+#define SCRIPT_CB_NUM	(MAX_CB_TYPE-1)
 
 static struct script_cb *pre_script_cb[SCRIPT_CB_NUM];
 static struct script_cb *post_script_cb[SCRIPT_CB_NUM];
diff --git a/script_cb.h b/script_cb.h
index af557c7..fbfbbfc 100644
--- a/script_cb.h
+++ b/script_cb.h
@@ -49,14 +49,14 @@ typedef int (cb_function)(struct sip_msg *msg, unsigned int flags, void *param);
  */
 enum script_cb_flag { REQUEST_CB=1, FAILURE_CB=2, ONREPLY_CB=4,
 			BRANCH_CB=8, ONSEND_CB=16, ERROR_CB=32,
-			LOCAL_CB=64, EVENT_CB=128 };
+			LOCAL_CB=64, EVENT_CB=128, BRANCH_FAILURE_CB=256 };
 
 /* Callback types used for executing the callbacks.
  * Keep in sync with script_cb_flag!!!
  */
 enum script_cb_type { REQUEST_CB_TYPE=1, FAILURE_CB_TYPE, ONREPLY_CB_TYPE,
 			BRANCH_CB_TYPE, ONSEND_CB_TYPE, ERROR_CB_TYPE,
-			LOCAL_CB_TYPE, EVENT_CB_TYPE };
+			LOCAL_CB_TYPE, EVENT_CB_TYPE, BRANCH_FAILURE_CB_TYPE, MAX_CB_TYPE };
 
 struct script_cb{
 	cb_function *cbf;




More information about the sr-dev mailing list