Browse code

core: Add defines required for a new branch_failure_route type

Hugh Waite authored on 26/03/2013 11:43:35
Showing 3 changed files
... ...
@@ -53,6 +53,7 @@
53 53
 #define ERROR_ROUTE   (1 << 5)
54 54
 #define LOCAL_ROUTE   (1 << 6)
55 55
 #define CORE_ONREPLY_ROUTE (1 << 7)
56
+#define BRANCH_FAILURE_ROUTE (1 << 8)
56 57
 #define ONREPLY_ROUTE (TM_ONREPLY_ROUTE|CORE_ONREPLY_ROUTE)
57 58
 #define EVENT_ROUTE   REQUEST_ROUTE
58 59
 #define ANY_ROUTE     (0xFFFFFFFF)
... ...
@@ -53,7 +53,7 @@
53 53
 #include "mem/mem.h"
54 54
 
55 55
 /* Number of cb types = last cb type */
56
-#define SCRIPT_CB_NUM	EVENT_CB_TYPE
56
+#define SCRIPT_CB_NUM	(MAX_CB_TYPE-1)
57 57
 
58 58
 static struct script_cb *pre_script_cb[SCRIPT_CB_NUM];
59 59
 static struct script_cb *post_script_cb[SCRIPT_CB_NUM];
... ...
@@ -49,14 +49,14 @@ typedef int (cb_function)(struct sip_msg *msg, unsigned int flags, void *param);
49 49
  */
50 50
 enum script_cb_flag { REQUEST_CB=1, FAILURE_CB=2, ONREPLY_CB=4,
51 51
 			BRANCH_CB=8, ONSEND_CB=16, ERROR_CB=32,
52
-			LOCAL_CB=64, EVENT_CB=128 };
52
+			LOCAL_CB=64, EVENT_CB=128, BRANCH_FAILURE_CB=256 };
53 53
 
54 54
 /* Callback types used for executing the callbacks.
55 55
  * Keep in sync with script_cb_flag!!!
56 56
  */
57 57
 enum script_cb_type { REQUEST_CB_TYPE=1, FAILURE_CB_TYPE, ONREPLY_CB_TYPE,
58 58
 			BRANCH_CB_TYPE, ONSEND_CB_TYPE, ERROR_CB_TYPE,
59
-			LOCAL_CB_TYPE, EVENT_CB_TYPE };
59
+			LOCAL_CB_TYPE, EVENT_CB_TYPE, BRANCH_FAILURE_CB_TYPE, MAX_CB_TYPE };
60 60
 
61 61
 struct script_cb{
62 62
 	cb_function *cbf;