Module: kamailio Branch: master Commit: cb984a53016762cb0932ed4dec4c75edb8997c0f URL: https://github.com/kamailio/kamailio/commit/cb984a53016762cb0932ed4dec4c75ed...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-10-02T12:21:40+02:00
tm: macro to define the ptr address for tm cell uac field
---
Modified: src/modules/tm/h_table.c
---
Diff: https://github.com/kamailio/kamailio/commit/cb984a53016762cb0932ed4dec4c75ed... Patch: https://github.com/kamailio/kamailio/commit/cb984a53016762cb0932ed4dec4c75ed...
---
diff --git a/src/modules/tm/h_table.c b/src/modules/tm/h_table.c index d4c86db9b5..4ca611e6ab 100644 --- a/src/modules/tm/h_table.c +++ b/src/modules/tm/h_table.c @@ -48,6 +48,10 @@ #include "uac.h" /* free_local_ack */
+#define T_UAC_PTR(T) ((tm_ua_client_t*)((char*)T + sizeof(tm_cell_t) \ + + MD5_LEN - sizeof(((tm_cell_t*)0)->md5))) + + static enum kill_reason kr;
/* pointer to the big table where all the transaction data lives */ @@ -337,9 +341,7 @@ struct cell *build_cell(struct sip_msg *p_msg) new_cell->uas.response.my_T = new_cell; init_rb_timers(&new_cell->uas.response); /* UAC */ - new_cell->uac = - (struct ua_client *)((char *)new_cell + sizeof(struct cell) - + MD5_LEN - sizeof(((struct cell *)0)->md5)); + new_cell->uac = T_UAC_PTR(new_cell); /* timers */ init_cell_timers(new_cell);