Changeset 6000
- Timestamp:
- May 23, 2019 1:42:27 PM (5 years ago)
- Location:
- pjproject/trunk/pjlib-util/src/pjlib-util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/resolver.c
r5981 r6000 1777 1777 pj_grp_lock_acquire(resolver->grp_lock); 1778 1778 1779 /* Save/update response cache. */ 1780 update_res_cache(resolver, &q->key, status, PJ_TRUE, dns_pkt); 1781 1779 /* Truncated responses MUST NOT be saved (cached). */ 1780 if (PJ_DNS_GET_TC(dns_pkt->hdr.flags) == 0) { 1781 /* Save/update response cache. */ 1782 update_res_cache(resolver, &q->key, status, PJ_TRUE, dns_pkt); 1783 } 1784 1782 1785 /* Recycle query objects, starting with the child queries */ 1783 1786 if (!pj_list_empty(&q->child_head)) { -
pjproject/trunk/pjlib-util/src/pjlib-util/srv_resolver.c
r5996 r6000 586 586 query_job->q_srv = NULL; 587 587 588 if (status == PJ_SUCCESS && pkt->hdr.anscount != 0) { 589 /* Got SRV response, build server entry. If A records are available 590 * in additional records section of the DNS response, save them too. 591 */ 592 build_server_entries(query_job, pkt); 593 594 } else if (status != PJ_SUCCESS) { 588 if (status == PJ_SUCCESS) { 589 if (PJ_DNS_GET_TC(pkt->hdr.flags)) { 590 /* Got truncated answer, the standard recommends to follow up 591 * the query using TCP. Since we currently don't support it, 592 * just return error. 593 */ 594 PJ_LOG(4,(query_job->objname, 595 "Discard truncated DNS SRV response for %.*s", 596 (int)query_job->full_name.slen, 597 query_job->full_name.ptr)); 598 599 status = PJ_EIGNORED; 600 query_job->last_error = status; 601 goto on_error; 602 } else if (pkt->hdr.anscount != 0) { 603 /* Got SRV response, build server entry. If A records are 604 * available in additional records section of the DNS response, 605 * save them too. 606 */ 607 build_server_entries(query_job, pkt); 608 } 609 610 } else { 595 611 char errmsg[PJ_ERR_MSG_SIZE]; 596 612
Note: See TracChangeset
for help on using the changeset viewer.