Browse Source

tm: Export additional functions from tm modules

- t_load_contacts and t_next_contacts in tm
- t_on_branch_failure in tmx
Hugh Waite 11 years ago
parent
commit
c86151089e
2 changed files with 7 additions and 0 deletions
  1. 3 0
      modules/tm/tm_load.c
  2. 4 0
      modules/tm/tm_load.h

+ 3 - 0
modules/tm/tm_load.c

@@ -148,6 +148,8 @@ int load_tm( struct tm_binds *tmb)
 	tmb->tm_ctx_get = tm_ctx_get;
 	tmb->tm_ctx_get = tm_ctx_get;
 #endif
 #endif
 	tmb->t_append_branches = t_append_branches;
 	tmb->t_append_branches = t_append_branches;
+	tmp->t_load_contacts = t_load_contacts;
+	tmp->t_next_contacts = t_next_contacts;
 	return 1;
 	return 1;
 }
 }
 
 
@@ -166,6 +168,7 @@ int load_xtm(tm_xapi_t *xapi)
 	xapi->t_on_reply      = t_on_reply;
 	xapi->t_on_reply      = t_on_reply;
 	xapi->t_check_trans   = t_check_trans;
 	xapi->t_check_trans   = t_check_trans;
 	xapi->t_is_canceled   = t_is_canceled;
 	xapi->t_is_canceled   = t_is_canceled;
+	xapi->t_on_branch_failure = t_on_branch_failure;
 
 
 	return 0;
 	return 0;
 }
 }

+ 4 - 0
modules/tm/tm_load.h

@@ -51,6 +51,7 @@
 #include "t_suspend.h"
 #include "t_suspend.h"
 #include "t_append_branches.h"
 #include "t_append_branches.h"
 #include "t_stats.h"
 #include "t_stats.h"
+#include "t_serial.h"
 
 
 /* export not usable from scripts */
 /* export not usable from scripts */
 #define NO_SCRIPT	-1
 #define NO_SCRIPT	-1
@@ -135,6 +136,8 @@ struct tm_binds {
 	void* reserved5;
 	void* reserved5;
 #endif
 #endif
 	t_append_branches_f	t_append_branches;
 	t_append_branches_f	t_append_branches;
+	cmd_function	t_load_contacts;
+	cmd_function	t_next_contacts;
 };
 };
 
 
 typedef struct tm_binds tm_api_t;
 typedef struct tm_binds tm_api_t;
@@ -182,6 +185,7 @@ int t_is_canceled(struct sip_msg* msg);
 typedef struct tm_xbinds {
 typedef struct tm_xbinds {
 	t_on_route_f t_on_failure;
 	t_on_route_f t_on_failure;
 	t_on_route_f t_on_branch;
 	t_on_route_f t_on_branch;
+	t_on_route_f t_on_branch_failure;
 	t_on_route_f t_on_reply;
 	t_on_route_f t_on_reply;
 	t_no_param_f t_check_trans;
 	t_no_param_f t_check_trans;
 	t_no_param_f t_is_canceled;
 	t_no_param_f t_is_canceled;