Browse code

dns cache: fixed missing sctp SRV queries

- added missing support for sctp SRV queries

Andrei Pelinescu-Onciul authored on 28/11/2008 10:41:40
Showing 1 changed files
... ...
@@ -2392,6 +2392,12 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port,
2392 2392
 					tmp[SRV_TLS_PREFIX_LEN + name->len] = '\0';
2393 2393
 					len=SRV_TLS_PREFIX_LEN + name->len;
2394 2394
 					break;
2395
+				case PROTO_SCTP:
2396
+					memcpy(tmp, SRV_SCTP_PREFIX, SRV_SCTP_PREFIX_LEN);
2397
+					memcpy(tmp+SRV_SCTP_PREFIX_LEN, name->s, name->len);
2398
+					tmp[SRV_SCTP_PREFIX_LEN + name->len] = '\0';
2399
+					len=SRV_SCTP_PREFIX_LEN + name->len;
2400
+					break;
2395 2401
 				default:
2396 2402
 					LOG(L_CRIT, "BUG: sip_resolvehost: unknown proto %d\n",
2397 2403
 							(int)srv_proto);