Module: kamailio
Branch: master
Commit: 106b8a659bd4a53e8a6872e9db8a9af0f12ff70a
URL: 
https://github.com/kamailio/kamailio/commit/106b8a659bd4a53e8a6872e9db8a9af0f12ff70a

Author: Wolfgang Kampichler <[email protected]>
Committer: Wolfgang Kampichler <[email protected]>
Date: 2021-04-07T13:10:30+02:00

core: parse_body.c/part_multipart_headers_cmp() changed log output from ERR to 
DBG in case a header does not exist

---

Modified: src/core/parser/parse_body.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/106b8a659bd4a53e8a6872e9db8a9af0f12ff70a.diff
Patch: 
https://github.com/kamailio/kamailio/commit/106b8a659bd4a53e8a6872e9db8a9af0f12ff70a.patch

---

diff --git a/src/core/parser/parse_body.c b/src/core/parser/parse_body.c
index 9794e43fb1..a9a3e64b82 100644
--- a/src/core/parser/parse_body.c
+++ b/src/core/parser/parse_body.c
@@ -475,8 +475,9 @@ int part_multipart_headers_cmp (char *buffer,
                                        ;
                                }
                        } else {
+                               /* Nothing matched */
                                error = -9;
-                               error_msg = "We reached the end of the buffer";
+                               error_msg = "Unsuccessfully reached the end of 
the buffer";
                        }
                        found = found_content_type * found_content_id * 
found_content_length;
                        if ((!found) && (!error)) {
@@ -504,7 +505,7 @@ int part_multipart_headers_cmp (char *buffer,
        }
 
        if (error < 0) {
-               if(error == -2) {
+               if ((error == -2) || (error == -9)) {
                        LM_DBG("result code: \"%i\" text: \"%s\".\n", error, 
error_msg);
                } else {
                        LM_ERR("error code: \"%i\" error text: \"%s\".\n", 
error, error_msg);


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to