Module: kamailio Branch: master Commit: 27e1e9102f07047a3d2c2f28baa708f14be556a6 URL: https://github.com/kamailio/kamailio/commit/27e1e9102f07047a3d2c2f28baa708f14be556a6
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2025-02-13T10:42:27+01:00 tm: jump to error when failing to built content length for uac cancel --- Modified: src/modules/tm/t_msgbuilder.c --- Diff: https://github.com/kamailio/kamailio/commit/27e1e9102f07047a3d2c2f28baa708f14be556a6.diff Patch: https://github.com/kamailio/kamailio/commit/27e1e9102f07047a3d2c2f28baa708f14be556a6.patch --- diff --git a/src/modules/tm/t_msgbuilder.c b/src/modules/tm/t_msgbuilder.c index 71fd4e644b3..d9231486c61 100644 --- a/src/modules/tm/t_msgbuilder.c +++ b/src/modules/tm/t_msgbuilder.c @@ -1827,7 +1827,8 @@ char *build_uac_cancel(str *headers, str *body, struct cell *cancelledT, char branch_buf[MAX_BRANCH_PARAM_LEN]; str branch_str; struct hostport hp; - str content_length, via; + str content_length; + str via = STR_NULL; LM_DBG("sing FROM=<%.*s>, TO=<%.*s>, CSEQ_N=<%.*s>\n", cancelledT->from_hdr.len, cancelledT->from_hdr.s, @@ -1866,7 +1867,7 @@ char *build_uac_cancel(str *headers, str *body, struct cell *cancelledT, /* Content Length */ if(print_content_length(&content_length, body) < 0) { LM_ERR("failed to print content-length\n"); - return 0; + goto error01; } /* Content-Length */ *len += (body ? (CONTENT_LENGTH_LEN + content_length.len + CRLF_LEN) : 0); _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!