Module: kamailio Branch: master Commit: f128db2b85a525ff82c28faffbeec3203f9560c3 URL: https://github.com/kamailio/kamailio/commit/f128db2b85a525ff82c28faffbeec320...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-12-18T12:16:08+01:00
tm: use coherent type int for tm route blocks indexes
---
Modified: src/modules/tm/h_table.h Modified: src/modules/tm/t_reply.c Modified: src/modules/tm/t_reply.h
---
Diff: https://github.com/kamailio/kamailio/commit/f128db2b85a525ff82c28faffbeec320... Patch: https://github.com/kamailio/kamailio/commit/f128db2b85a525ff82c28faffbeec320...
---
diff --git a/src/modules/tm/h_table.h b/src/modules/tm/h_table.h index 8481ccde29e..d95cb7d717c 100644 --- a/src/modules/tm/h_table.h +++ b/src/modules/tm/h_table.h @@ -225,13 +225,11 @@ typedef struct ua_client */ struct retr_buf *local_ack; /* the route to take if no final positive reply arrived */ - unsigned short on_failure; + int on_failure; /* the route to take for all failure replies */ - unsigned short on_branch_failure; + int on_branch_failure; /* the onreply_route to be processed if registered to do so */ - unsigned short on_reply; - /* unused - keep the structure aligned to 32b */ - unsigned short on_unused; + int on_reply; } tm_ua_client_t;
@@ -429,18 +427,18 @@ typedef struct cell
/* nr of replied branch; 0..sr_dst_max_branches=branch value, * -1 no reply, -2 local reply */ - short relayed_reply_branch; + int relayed_reply_branch;
/* the route to take if no final positive reply arrived */ - unsigned short on_failure; + int on_failure; /* the route to take for all failure replies */ - unsigned short on_branch_failure; + int on_branch_failure; /* the onreply_route to be processed if registered to do so */ - unsigned short on_reply; + int on_reply; /* The route to take for each downstream branch separately */ - unsigned short on_branch; + int on_branch; /* branch route backup for late branch add (t_append_branch) */ - unsigned short on_branch_delayed; + int on_branch_delayed;
/* place holder for MD5checksum, MD5_LEN bytes are extra alloc'ed */ char md5[0]; diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c index e9b9df434a5..c5a58bba8ab 100644 --- a/src/modules/tm/t_reply.c +++ b/src/modules/tm/t_reply.c @@ -224,17 +224,17 @@ void t_on_reply(unsigned int go_to) }
-unsigned int get_on_failure() +int get_on_failure() { return goto_on_failure; }
-unsigned int get_on_branch_failure() +int get_on_branch_failure() { return goto_on_branch_failure; }
-unsigned int get_on_reply() +int get_on_reply() { return goto_on_reply; } diff --git a/src/modules/tm/t_reply.h b/src/modules/tm/t_reply.h index 709b70454ed..18ce47f457c 100644 --- a/src/modules/tm/t_reply.h +++ b/src/modules/tm/t_reply.h @@ -199,11 +199,11 @@ void on_failure_reply( replies arrive */ void t_on_failure(unsigned int go_to); -unsigned int get_on_failure(void); +int get_on_failure(void); void t_on_branch_failure(unsigned int go_to); -unsigned int get_on_branch_failure(void); +int get_on_branch_failure(void); void t_on_reply(unsigned int go_to); -unsigned int get_on_reply(void); +int get_on_reply(void);
int t_retransmit_reply(struct cell *t);