Module: kamailio Branch: master Commit: 619c7fe6db9c090ef9645ec8a39d43d00ba215bf URL: https://github.com/kamailio/kamailio/commit/619c7fe6db9c090ef9645ec8a39d43d0...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-12-31T14:06:40+01:00
domainpolicy: removed constant condition
---
Modified: src/modules/domainpolicy/domainpolicy.c
---
Diff: https://github.com/kamailio/kamailio/commit/619c7fe6db9c090ef9645ec8a39d43d0... Patch: https://github.com/kamailio/kamailio/commit/619c7fe6db9c090ef9645ec8a39d43d0...
---
diff --git a/src/modules/domainpolicy/domainpolicy.c b/src/modules/domainpolicy/domainpolicy.c index 0fb0c43f617..cacd97fa627 100644 --- a/src/modules/domainpolicy/domainpolicy.c +++ b/src/modules/domainpolicy/domainpolicy.c @@ -900,14 +900,9 @@ int dp_apply_policy(struct sip_msg *_msg, char *_s1, char *_s2) }
at = (char *)&(duri[0]); - len = 0; - if((len + 4) > MAX_URI_SIZE) { - LM_ERR("duri buffer to small to add uri schema\n"); - return -1; - } + len = 4; memcpy(at, "sip:", 4); at = at + 4; - len = len + 4;
domain = &(_msg->parsed_uri.host); LM_DBG("domain is %.*s.\n", domain->len, ZSW(domain->s));