Module: kamailio
Branch: master
Commit: ed1322414eb46c75b9db22e76b6f9e64ce191ad4
URL:
https://github.com/kamailio/kamailio/commit/ed1322414eb46c75b9db22e76b6f9e6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-05-14T09:55:20+02:00
tls: avoid compiler warning with extra check on char pointer
---
Modified: modules/tls/tls_domain.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ed1322414eb46c75b9db22e76b6f9e6…
Patch:
https://github.com/kamailio/kamailio/commit/ed1322414eb46c75b9db22e76b6f9e6…
---
diff --git a/modules/tls/tls_domain.c b/modules/tls/tls_domain.c
index 0d95a62..97b6356 100644
--- a/modules/tls/tls_domain.c
+++ b/modules/tls/tls_domain.c
@@ -1310,7 +1310,7 @@ tls_domain_t* tls_lookup_cfg(tls_domains_cfg_t* cfg, int type,
}
if ((p->port==0 || p->port == port) && ip_addr_cmp(&p->ip, ip)) {
if(sname && sname->len>0) {
- if(p->server_name.len==sname->len
+ if(p->server_name.s && p->server_name.len==sname->len
&& strncasecmp(p->server_name.s, sname->s, sname->len)==0) {
LM_DBG("socket+server_name based TLS server domain found\n");
return p;