Module: kamailio Branch: master Commit: c9b49e30b308f5283f6eca4d871be0f0a5212d38 URL: https://github.com/kamailio/kamailio/commit/c9b49e30b308f5283f6eca4d871be0f0a5212d38
Author: frederic <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2026-05-28T08:34:09+02:00 cplc: log updates on 3xx response and skil unlinking lump - modify trace level when a 3XX response is managed and ignore3xx is activated - skip unlinking lump on current sip message but the pointer is no more valid - GH #4755 --- Modified: src/modules/cplc/cpl_proxy.h Modified: src/modules/cplc/cpl_run.c --- Diff: https://github.com/kamailio/kamailio/commit/c9b49e30b308f5283f6eca4d871be0f0a5212d38.diff Patch: https://github.com/kamailio/kamailio/commit/c9b49e30b308f5283f6eca4d871be0f0a5212d38.patch --- diff --git a/src/modules/cplc/cpl_proxy.h b/src/modules/cplc/cpl_proxy.h index 9abbae94eb6..a20dd92757d 100644 --- a/src/modules/cplc/cpl_proxy.h +++ b/src/modules/cplc/cpl_proxy.h @@ -149,7 +149,13 @@ static void reply_callback(struct cell *t, int type, struct tmcb_params *ps) int rez; if(intr == 0) { - LM_WARN("param=0 for callback %d, transaction=%p \n", type, t); + if((1 == cpl_env.ignore3xx) && (type & TMCB_RESPONSE_OUT)) { + LM_DBG("param=0 for callback %d, transaction=%p, due to a 3XX " + "ignored \n", + type, t); + } else { + LM_WARN("param=0 for callback %d, transaction=%p \n", type, t); + } return; } diff --git a/src/modules/cplc/cpl_run.c b/src/modules/cplc/cpl_run.c index 3b7360b4eee..6cdf6ebff26 100644 --- a/src/modules/cplc/cpl_run.c +++ b/src/modules/cplc/cpl_run.c @@ -109,7 +109,7 @@ static str cpl_302_reason = str_init("Moved temporarily"); } else { \ check_overflow_by_ptr((_p_) + (_len_), _intr_, _error_); \ _s_ = _p_; \ - (_p_) += (_len_) + 1 * (((_len_)&0x0001) == 1); \ + (_p_) += (_len_) + 1 * (((_len_) & 0x0001) == 1); \ (_len_) -= (_FIXUP_); \ } \ } while(0) @@ -745,12 +745,6 @@ static inline char *run_redirect(struct cpl_interpreter *intr) else i = cpl_fct.slb.freply(intr->msg, 302, &cpl_302_reason); - /* msg which I'm working on can be in private memory or is a clone into - * shared memory (if I'm after a failed proxy); So, it's better to removed - * by myself the lump that I added previously */ - unlink_lump_rpl(intr->msg, lump); - free_lump_rpl(lump); - if(i != 1) { LM_ERR("unable to send redirect reply!\n"); goto runtime_error; _______________________________________________ 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!
