Changeset 2006 for pjproject/trunk


Ignore:
Timestamp:
Jun 12, 2008 12:36:59 PM (16 years ago)
Author:
bennylp
Message:

Bug in srv_resolver: host_resolved value may exceed number of SRV records if there are more than A records in Additional Record section of the response for a single SRV target (thanks Ruud Klaver)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util/srv_resolver.c

    r1587 r2006  
    286286                unsigned cnt = query_job->srv[j].addr_cnt; 
    287287                query_job->srv[j].addr[cnt].s_addr = rr->rdata.a.ip_addr.s_addr; 
     288                /* Only increment host_resolved once per SRV record */ 
     289                if (query_job->srv[j].addr_cnt == 0) 
     290                    ++query_job->host_resolved; 
    288291                ++query_job->srv[j].addr_cnt; 
    289                 ++query_job->host_resolved; 
    290292                break; 
    291293            } 
Note: See TracChangeset for help on using the changeset viewer.