- enable doing SRV query, GH #2553
(cherry picked from commit 18f59c10582845da5eea280990daf19c804978fb)
... | ... |
@@ -268,6 +268,7 @@ int add_dst(rt_data_t *r, |
268 | 268 |
#define GWABUF_MAX_SIZE 512 |
269 | 269 |
char gwabuf[GWABUF_MAX_SIZE]; |
270 | 270 |
str gwas; |
271 |
+ unsigned short port; |
|
271 | 272 |
|
272 | 273 |
if(NULL == r || NULL == ip) { |
273 | 274 |
LM_ERR("invalid parametres\n"); |
... | ... |
@@ -331,7 +332,8 @@ int add_dst(rt_data_t *r, |
331 | 332 |
} |
332 | 333 |
/* note we discard the port discovered by the resolve function - we are |
333 | 334 |
interested only in the port that was actually configured. */ |
334 |
- if((he = sip_resolvehost(&uri.host, NULL, (char *)(void *)&uri.proto)) |
|
335 |
+ port = 0; |
|
336 |
+ if((he = sip_resolvehost(&uri.host, &port, (char *)(void *)&uri.proto)) |
|
335 | 337 |
== 0) { |
336 | 338 |
if(dr_force_dns) { |
337 | 339 |
LM_ERR("cannot resolve <%.*s>\n", uri.host.len, uri.host.s); |