Module: sip-router
Branch: 4.1
Commit: 09fb0aae62761ce4f251ab22c6ab9cde55e2c663
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=09fb0aa…
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)
---
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 d431a38..285120a 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 6d5959e..3d1a3f5 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;