Skip to content

Commit 76e1a95

Browse files
Ported user changes
1 parent ab8c5e3 commit 76e1a95

File tree

10 files changed

+279
-216
lines changed

10 files changed

+279
-216
lines changed

modules/tm/t_hooks.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,6 @@ void destroy_tmcb_lists(void)
8888
}
8989
}
9090

91-
static unsigned int tmcb_flags = 0;
92-
void set_tmcb_flags(unsigned int flags) {
93-
tmcb_flags |= flags;
94-
}
95-
9691
int insert_tmcb(struct tmcb_head_list *cb_list, int types,
9792
transaction_cb f, void *param, release_tmcb_param release_func )
9893
{
@@ -113,7 +108,6 @@ int insert_tmcb(struct tmcb_head_list *cb_list, int types,
113108
cbp->param = param;
114109
cbp->release = release_func;
115110
cbp->types = types;
116-
cbp->flags = tmcb_flags;
117111
if (cbp->next)
118112
cbp->id = cbp->next->id+1;
119113
else
@@ -216,7 +210,6 @@ static void run_any_trans_callbacks(struct tmcb_head_list *list, unsigned int ty
216210
LM_DBG("trans=%p, callback type %d, id %d entered\n",
217211
trans, type, cbp->id );
218212
params.param = &(cbp->param);
219-
params.flags = cbp->flags;
220213
cbp->callback( trans, type, &params );
221214
if ((cbp->types)&(TMCB_REQUEST_IN|TMCB_LOCAL_TRANS_NEW)) {
222215
if (req && req->dst_uri.len==-1) {
@@ -230,7 +223,6 @@ static void run_any_trans_callbacks(struct tmcb_head_list *list, unsigned int ty
230223
/* env cleanup */
231224
set_avp_list( backup );
232225
tmcb_extra1 = tmcb_extra2 = 0;
233-
tmcb_flags = 0;
234226
set_t(trans_backup);
235227
}
236228

modules/tm/t_hooks.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ struct tmcb_params {
204204
struct sip_msg* req;
205205
struct sip_msg* rpl;
206206
int code;
207-
unsigned int flags;
208207
void **param;
209208
void *extra1;
210209
void *extra2;
@@ -225,7 +224,6 @@ struct tm_callback {
225224
transaction_cb* callback; /* callback function */
226225
void *param; /* param to be passed to callback function */
227226
release_tmcb_param *release; /* function to release the callback param when the callback is deleted */
228-
unsigned int flags; /* flags to be passed into the callback*/
229227
struct tm_callback* next;
230228
};
231229

@@ -266,9 +264,6 @@ int insert_tmcb(struct tmcb_head_list *cb_list, int types,
266264
/* set extra params for callbacks */
267265
void set_extra_tmcb_params(void *extra1, void *extra2);
268266

269-
/* set extra params for callbacks */
270-
void set_tmcb_flags(unsigned int flags);
271-
272267
/* run all transaction callbacks for an event type */
273268
void run_trans_callbacks( int type , struct cell *trans,
274269
struct sip_msg *req, struct sip_msg *rpl, int code );

modules/tm/tm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,6 @@ static int fixup_inject_flags(void **param)
767767
int load_tm( struct tm_binds *tmb)
768768
{
769769
tmb->register_tmcb = register_tmcb;
770-
tmb->set_tmcb_flags = set_tmcb_flags;
771770

772771
/* relay function */
773772
tmb->t_relay = w_t_relay;

modules/tm/tm_load.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747

4848
struct tm_binds {
4949
register_tmcb_f register_tmcb;
50-
set_tmcb_flags_f set_tmcb_flags;
51-
5250
trelay_f t_relay;
5351
tcheck_trans_f t_check_trans;
5452

modules/topology_hiding/th_common_logic.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@
2323

2424
#include "../../str.h"
2525
#include "../../data_lump.h"
26+
#include "../../mem/shm_mem.h"
2627
#include "../../parser/contact/parse_contact.h"
2728

29+
struct th_params {
30+
str ct_caller_user;
31+
str ct_callee_user;
32+
};
33+
2834
#define RECORD_ROUTE "Record-Route: "
2935
#define RECORD_ROUTE_LEN (sizeof(RECORD_ROUTE)-1)
3036

@@ -70,4 +76,9 @@ static inline char *topo_ct_param_copy(char *buf, str *name, str *val, int shoul
7076
return buf;
7177
}
7278

79+
static void shm_free_wrap(void *param) {
80+
if (param)
81+
shm_free(param);
82+
}
83+
7384
#endif

0 commit comments

Comments
 (0)