Module: kamailio Branch: master Commit: 027ca1b2e1d0857ac039ff8fee9fecadd88bbda0 URL: https://github.com/kamailio/kamailio/commit/027ca1b2e1d0857ac039ff8fee9fecadd88bbda0
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2024-11-15T09:33:52+01:00 tm: small helper functions to get/set current T and branch - pair for coherent naming --- Modified: src/modules/tm/t_lookup.c Modified: src/modules/tm/t_lookup.h --- Diff: https://github.com/kamailio/kamailio/commit/027ca1b2e1d0857ac039ff8fee9fecadd88bbda0.diff Patch: https://github.com/kamailio/kamailio/commit/027ca1b2e1d0857ac039ff8fee9fecadd88bbda0.patch --- diff --git a/src/modules/tm/t_lookup.c b/src/modules/tm/t_lookup.c index 48e1634cce8..f0cebc014fe 100644 --- a/src/modules/tm/t_lookup.c +++ b/src/modules/tm/t_lookup.c @@ -150,6 +150,18 @@ int get_t_branch() return T_branch; } +void tm_get_tb(struct cell **t, int *branch) +{ + *t = T; + *branch = T_branch; +} + +void tm_set_tb(struct cell *t, int branch) +{ + T = t; + T_branch = branch; +} + /** * return the transaction by combining get() and t_check_msg() * - if T is not set, checks the transactions table for msg, and if found, diff --git a/src/modules/tm/t_lookup.h b/src/modules/tm/t_lookup.h index f3f69af4ac5..e9c019c7b46 100644 --- a/src/modules/tm/t_lookup.h +++ b/src/modules/tm/t_lookup.h @@ -79,6 +79,8 @@ int get_t_branch(void); typedef void (*tsett_f)(struct cell *t, int branch); void set_t(struct cell *t, int branch); +void tm_get_tb(struct cell **t, int *branch); +void tm_set_tb(struct cell *t, int branch); #define T_GET_TI "t_get_trans_ident" #define T_LOOKUP_IDENT "t_lookup_ident" _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!