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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2025-11-19T12:25:57+01:00

core: parser/digest - more details on parsing failure

---

Modified: src/core/parser/digest/digest.c
Modified: src/core/parser/digest/digest_parser.c

---

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

---

diff --git a/src/core/parser/digest/digest.c b/src/core/parser/digest/digest.c
index 5f8ea477c01..7e7deda2fa7 100644
--- a/src/core/parser/digest/digest.c
+++ b/src/core/parser/digest/digest.c
@@ -320,7 +320,7 @@ int find_credentials(struct sip_msg *msg, str *realm, 
hdr_types_t hftype,
        while(ptr) {
                res = parse_credentials(ptr);
                if(res < 0) {
-                       LM_ERR("error while parsing credentials\n");
+                       LM_ERR("error while parsing credentials (%d)\n", res);
                        return (res == -1) ? -2 : -3;
                } else if(res == 0) {
                        r = &(((auth_body_t *)(ptr->parsed))->digest.realm);
diff --git a/src/core/parser/digest/digest_parser.c 
b/src/core/parser/digest/digest_parser.c
index 9ce9d184099..eb772ba5090 100644
--- a/src/core/parser/digest/digest_parser.c
+++ b/src/core/parser/digest/digest_parser.c
@@ -176,6 +176,7 @@ static inline int parse_digest_param(str *_s, dig_cred_t 
*_c)
        trim_leading(_s);
 
        if(_s->len == 0) {
+               LM_ERR("no value for parameter type: %d\n", t);
                return -2;
        }
 

_______________________________________________
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!

Reply via email to