Forráskód Böngészése

- t_newtran export to the other modules

Bogdan-Andrei Iancu 21 éve
szülő
commit
b24f1ec7bc
3 módosított fájl, 6 hozzáadás és 0 törlés
  1. 1 0
      modules/tm/t_lookup.h
  2. 4 0
      modules/tm/tm_load.c
  3. 1 0
      modules/tm/tm_load.h

+ 1 - 0
modules/tm/t_lookup.h

@@ -83,6 +83,7 @@ void set_t(struct cell *t);
 #define T_IS_LOCAL     "t_is_local"
 
 typedef int (*tislocal_f)(struct sip_msg*);
+typedef int (*tnewtran_f)(struct sip_msg*);
 typedef int (*tget_ti_f)(struct sip_msg*, unsigned int*, unsigned int*);
 typedef int (*tlookup_ident_f)(struct cell**, unsigned int, unsigned int);
 

+ 4 - 0
modules/tm/tm_load.c

@@ -45,6 +45,10 @@ int load_tm( struct tm_binds *tmb)
 		LOG(L_ERR, LOAD_ERROR "'register_tmcb' not found\n");
 		return -1;
 	}
+	if (!( tmb->t_newtran=(tnewtran_f)find_export("t_newtran", 0, 0)) ) {
+		LOG(L_ERR, LOAD_ERROR "'t_newtran' not found\n");
+		return -1;
+	}
 	if (!( tmb->t_relay_to_tcp=find_export(T_RELAY_TO_TCP, 2, 0)) ) {
 		LOG(L_ERR, LOAD_ERROR "'t_relay_to_tcp' not found\n");
 		return -1;

+ 1 - 0
modules/tm/tm_load.h

@@ -78,6 +78,7 @@ struct tm_binds {
 	cmd_function     t_relay_to_udp;
 	cmd_function     t_relay_to_tcp;
 	cmd_function     t_relay;
+	tnewtran_f       t_newtran;
 	treply_f         t_reply;
 	treply_wb_f      t_reply_with_body;
 	tislocal_f       t_is_local;