[SR-Dev] git:ser_core_cvs: dns cache: fixed missing sctp SRV queries

Andrei Pelinescu-Onciul andrei at iptel.org
Tue Dec 16 16:02:50 CET 2008


Module: sip-router
Branch: ser_core_cvs
Commit: 5a1f979819f11fe453546c0ceaa067d93c8e3343
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5a1f979819f11fe453546c0ceaa067d93c8e3343

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Fri Nov 28 10:41:40 2008 +0000

dns cache: fixed missing sctp SRV queries

- added missing support for sctp SRV queries

---

 dns_cache.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dns_cache.c b/dns_cache.c
index 5cc8431..14598e0 100644
--- a/dns_cache.c
+++ b/dns_cache.c
@@ -2392,6 +2392,12 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port,
 					tmp[SRV_TLS_PREFIX_LEN + name->len] = '\0';
 					len=SRV_TLS_PREFIX_LEN + name->len;
 					break;
+				case PROTO_SCTP:
+					memcpy(tmp, SRV_SCTP_PREFIX, SRV_SCTP_PREFIX_LEN);
+					memcpy(tmp+SRV_SCTP_PREFIX_LEN, name->s, name->len);
+					tmp[SRV_SCTP_PREFIX_LEN + name->len] = '\0';
+					len=SRV_SCTP_PREFIX_LEN + name->len;
+					break;
 				default:
 					LOG(L_CRIT, "BUG: sip_resolvehost: unknown proto %d\n",
 							(int)srv_proto);




More information about the sr-dev mailing list