Module: sip-router
Branch: 4.0
Commit: 6121e8ee902d6b40bb50f20f0ce0a1315ede3500
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6121e8e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Nov 24 16:05:49 2013 +0100
tm: exported set_t() and get_t_branch() viam tm api
- allows to backup and restore pointers to T and branch
(cherry picked from commit 777dd5e28ff6b4fcc3b1c44e841eb415c974075f)
(cherry picked from commit 09fb0aae62761ce4f251ab22c6ab9cde55e2c663)
---
modules/tm/t_lookup.h | 3 +++
modules/tm/tm_load.c | 2 ++
modules/tm/tm_load.h | 2 ++
3 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/modules/tm/t_lookup.h b/modules/tm/t_lookup.h
index 32a9e8a..cced995 100644
--- a/modules/tm/t_lookup.h
+++ b/modules/tm/t_lookup.h
@@ -86,10 +86,13 @@ int t_check_msg(struct sip_msg* , int *branch );
typedef struct cell * (*tgett_f)(void);
struct cell *get_t(void);
+
+typedef int (*tgett_branch_f)(void);
int get_t_branch(void);
/* use carefully or better not at all -- current transaction is
* primarily set by lookup functions */
+typedef void (*tsett_f)(struct cell *t, int branch);
void set_t(struct cell *t, int branch);
diff --git a/modules/tm/tm_load.c b/modules/tm/tm_load.c
index 5a0c936..1b422c5 100644
--- a/modules/tm/tm_load.c
+++ b/modules/tm/tm_load.c
@@ -105,6 +105,8 @@ int load_tm( struct tm_binds *tmb)
tmb->free_dlg = free_dlg;
tmb->print_dlg = print_dlg;
tmb->t_gett = get_t;
+ tmb->t_gett_branch = get_t_branch;
+ tmb->t_sett = set_t;
tmb->calculate_hooks = w_calculate_hooks;
tmb->t_uac = t_uac;
tmb->t_uac_with_ids = t_uac_with_ids;
diff --git a/modules/tm/tm_load.h b/modules/tm/tm_load.h
index 1c43d41..0c4ece9 100644
--- a/modules/tm/tm_load.h
+++ b/modules/tm/tm_load.h
@@ -82,6 +82,8 @@ struct tm_binds {
free_dlg_f free_dlg;
print_dlg_f print_dlg;
tgett_f t_gett;
+ tgett_branch_f t_gett_branch;
+ tsett_f t_sett;
calculate_hooks_f calculate_hooks;
t_uac_t t_uac;
t_uac_with_ids_t t_uac_with_ids;