mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
Add support for older name resolving version libraries like openBSD
Fix support of OS's like openBSD that use an older nameser.h, this change reverts the defines to the older style which on other systems is found in nameser_compat.h Tested on openBSD 6.0, Debian 8 ASTERISK-26608 #close Change-Id: Iffb36caab8c5aa9dece0ce2d009041f7b56cc86a
This commit is contained in:
@@ -183,7 +183,7 @@ const char *ast_dns_srv_get_host(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_srv_record *srv = (struct ast_dns_srv_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_srv);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_SRV);
|
||||
return srv->host;
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ unsigned short ast_dns_srv_get_priority(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_srv_record *srv = (struct ast_dns_srv_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_srv);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_SRV);
|
||||
return srv->priority;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ unsigned short ast_dns_srv_get_weight(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_srv_record *srv = (struct ast_dns_srv_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_srv);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_SRV);
|
||||
return srv->weight;
|
||||
}
|
||||
|
||||
@@ -207,6 +207,6 @@ unsigned short ast_dns_srv_get_port(const struct ast_dns_record *record)
|
||||
{
|
||||
struct ast_dns_srv_record *srv = (struct ast_dns_srv_record *) record;
|
||||
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == ns_t_srv);
|
||||
ast_assert(ast_dns_record_get_rr_type(record) == T_SRV);
|
||||
return srv->port;
|
||||
}
|
||||
|
Reference in New Issue
Block a user