Skip to content

Commit

Permalink
fix regression dns bug that prevented DNS A record lookup if AAA look…
Browse files Browse the repository at this point in the history
…up failed
  • Loading branch information
davehorton committed Jun 24, 2023
1 parent 3ac6d43 commit 81b17d1
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions libsofia-sip-ua/nta/nta.c
Original file line number Diff line number Diff line change
Expand Up @@ -10974,8 +10974,6 @@ int outgoing_query_aaaa(nta_outgoing_t *orq, struct sipdns_query *sq)
sr->sr_target = sq->sq_domain;
sr->sr_current = sq;

SU_DEBUG_5(("%s:\n", __func__));

answers = SRES_NO_CACHE ? NULL : sres_cached_answers(orq->orq_agent->sa_resolver,
sres_type_aaaa, sq->sq_domain);

Expand All @@ -10984,7 +10982,6 @@ int outgoing_query_aaaa(nta_outgoing_t *orq, struct sipdns_query *sq)
answers ? " (cached)" : ""));

if (answers) {
SU_DEBUG_5(("%s: got answers\n", __func__));
outgoing_answer_aaaa(orq, NULL, answers);
return 0;
}
Expand All @@ -11008,8 +11005,6 @@ void outgoing_answer_aaaa(sres_context_t *orq, sres_query_t *q,
size_t i, j, found;
char *result, **results = NULL;

SU_DEBUG_5(("%s:\n", __func__));

assert(sq); assert(sq->sq_type == sres_type_aaaa);

sr->sr_query = NULL;
Expand Down Expand Up @@ -11048,14 +11043,8 @@ void outgoing_answer_aaaa(sres_context_t *orq, sres_query_t *q,

sres_free_answers(orq->orq_agent->sa_resolver, answers);

if (results) {
SU_DEBUG_5(("%s: got results\n", __func__));
outgoing_query_results(orq, sq, results, found);
}
else if (!q)
SU_DEBUG_5(("%s: no results, resolving error\n", __func__));
outgoing_resolving_error(orq, SIPDNS_503_ERROR);
}
outgoing_query_results(orq, sq, results, found);
}
#endif /* SU_HAVE_IN6 */

/* Query A records */
Expand All @@ -11068,8 +11057,6 @@ int outgoing_query_a(nta_outgoing_t *orq, struct sipdns_query *sq)
sr->sr_target = sq->sq_domain;
sr->sr_current = sq;

SU_DEBUG_5(("%s:\n", __func__));

answers = SRES_NO_CACHE ? NULL : sres_cached_answers(orq->orq_agent->sa_resolver,
sres_type_a, sq->sq_domain);

Expand Down

0 comments on commit 81b17d1

Please sign in to comment.