Răsfoiți Sursa

tm: unref_cell(t) added to tm api

- wrapper to UNREF(T) define
- used by K extensions (tmx module)
Daniel-Constantin Mierla 16 ani în urmă
părinte
comite
61ad14ac45
4 a modificat fișierele cu 8 adăugiri și 1 ștergeri
  1. 4 1
      modules/tm/t_funcs.c
  2. 2 0
      modules/tm/t_funcs.h
  3. 1 0
      modules/tm/tm_load.c
  4. 1 0
      modules/tm/tm_load.h

+ 4 - 1
modules/tm/t_funcs.c

@@ -447,4 +447,7 @@ int fr_inv_avp2timer(unsigned int* timer)
 		return 1;
 }
 
-
+void unref_cell(struct cell *t)
+{
+	UNREF(t);
+}

+ 2 - 0
modules/tm/t_funcs.h

@@ -150,6 +150,8 @@ int send_pr_buffer( struct retr_buf *rb, void *buf, int len);
 int init_avp_params(char *fr_timer_param, char *fr_inv_timer_param);
 
 
+typedef void (*unref_cell_f)(struct cell *t);
+void unref_cell(struct cell *t);
 /*
  * Get the FR_{INV}_TIMER from corresponding AVP
  */

+ 1 - 0
modules/tm/tm_load.c

@@ -233,6 +233,7 @@ int load_tm( struct tm_binds *tmb)
 	tmb->generate_fromtag = generate_fromtag;
 	tmb->t_lookup_request = t_lookup_request;
 	tmb->t_check = t_check;
+	tmb->unref_cell = unref_cell;
 
 #ifdef WITH_TM_CTX
 	tmb->tm_ctx_get = tm_ctx_get;

+ 1 - 0
modules/tm/tm_load.h

@@ -140,6 +140,7 @@ struct tm_binds {
 	generate_fromtag_f generate_fromtag;
 	tlookup_request_f t_lookup_request;
 	tcheck_f t_check;
+	unref_cell_f unref_cell;
 #ifdef WITH_TM_CTX
 	tm_ctx_get_f tm_ctx_get;
 #else