Module: kamailio Branch: master Commit: 47862f6b134914f7f88cd6368d1fb9711df4810d URL: https://github.com/kamailio/kamailio/commit/47862f6b134914f7f88cd6368d1fb9711df4810d
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2025-12-12T11:09:06+01:00 tm: update last chars of ack via branch for local_ack_branch_mode == 1 --- Modified: src/modules/tm/t_msgbuilder.c --- Diff: https://github.com/kamailio/kamailio/commit/47862f6b134914f7f88cd6368d1fb9711df4810d.diff Patch: https://github.com/kamailio/kamailio/commit/47862f6b134914f7f88cd6368d1fb9711df4810d.patch --- diff --git a/src/modules/tm/t_msgbuilder.c b/src/modules/tm/t_msgbuilder.c index 4cf8ecf3633..582df04a3f4 100644 --- a/src/modules/tm/t_msgbuilder.c +++ b/src/modules/tm/t_msgbuilder.c @@ -1823,11 +1823,13 @@ int t_calc_branch_ack(struct cell *t, int b, char *branch, int *branch_len) { char md5b[MD5_LEN + 1]; int i = 0; + int k = 0; if(tm_local_ack_branch_mode == 1) { memcpy(md5b, t->md5, MD5_LEN); md5b[MD5_LEN] = '\0'; - for(i = MD5_LEN - 1; i < 4; i--) { + for(k = 0; k < 4; k++) { + i = MD5_LEN - 1 - k; if(md5b[i] >= '0' && md5b[i] < '9') { md5b[i] = md5b[i] + 1; } else if(md5b[i] == '9') { _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
