Module: kamailio
Branch: master
Commit: 7a73e08b0e5b4c3fbeb4f097c1f891d06c74651d
URL: 
https://github.com/kamailio/kamailio/commit/7a73e08b0e5b4c3fbeb4f097c1f891d06c74651d

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-02-01T07:40:11+01:00

msrp: variable for extra headers used in local replies

---

Modified: src/modules/msrp/msrp_cmap.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/7a73e08b0e5b4c3fbeb4f097c1f891d06c74651d.diff
Patch: 
https://github.com/kamailio/kamailio/commit/7a73e08b0e5b4c3fbeb4f097c1f891d06c74651d.patch

---

diff --git a/src/modules/msrp/msrp_cmap.c b/src/modules/msrp/msrp_cmap.c
index a1e79e84447..e1a378ee7ac 100644
--- a/src/modules/msrp/msrp_cmap.c
+++ b/src/modules/msrp/msrp_cmap.c
@@ -156,6 +156,7 @@ int msrp_cmap_save(msrp_frame_t *mf)
        char sbuf[MSRP_SBUF_SIZE];
        str srcaddr;
        str srcsock;
+       str xhdrs;
        int msize;
        int expires;
        msrp_citem_t *it;
@@ -172,16 +173,18 @@ int msrp_cmap_save(msrp_frame_t *mf)
                expires = msrp_auth_max_expires;
        if(expires < msrp_auth_min_expires) {
                LM_DBG("expires is lower than min value\n");
-               srcaddr.len = snprintf(sbuf, MSRP_SBUF_SIZE, "Min-Expires: 
%d\r\n",
+               xhdrs.len = snprintf(sbuf, MSRP_SBUF_SIZE, "Min-Expires: 
%d\r\n",
                                msrp_auth_min_expires);
-               msrp_reply(mf, &msrp_reply_423_code, &msrp_reply_423_text, 
&srcaddr);
+               xhdrs.s = sbuf;
+               msrp_reply(mf, &msrp_reply_423_code, &msrp_reply_423_text, 
&xhdrs);
                return -3;
        }
        if(expires > msrp_auth_max_expires) {
                LM_DBG("expires is greater than max value\n");
-               srcaddr.len = snprintf(sbuf, MSRP_SBUF_SIZE, "Max-Expires: 
%d\r\n",
+               xhdrs.len = snprintf(sbuf, MSRP_SBUF_SIZE, "Max-Expires: 
%d\r\n",
                                msrp_auth_max_expires);
-               msrp_reply(mf, &msrp_reply_423_code, &msrp_reply_423_text, 
&srcaddr);
+               msrp_reply(mf, &msrp_reply_423_code, &msrp_reply_423_text, 
&xhdrs);
+               xhdrs.s = sbuf;
                return -4;
        }
        if(msrp_frame_get_first_from_path(mf, &fpeer) < 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!

Reply via email to