Changeset 4971
- Timestamp:
- Dec 24, 2014 5:46:51 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/srv_resolver.c
r4774 r4971 406 406 static pj_status_t resolve_hostnames(pj_dns_srv_async_query *query_job) 407 407 { 408 unsigned i ;408 unsigned i, err_cnt = 0; 409 409 pj_status_t err=PJ_SUCCESS, status; 410 410 … … 421 421 srv->parent = query_job; 422 422 423 /* See also #1809: dns_callback() will be invoked synchronously when response 424 * is available in the cache, and var 'query_job->host_resolved' will get 425 * incremented within the dns_callback(), which will cause this function 426 * returning false error, so don't use that variable for counting errors. 427 */ 423 428 status = pj_dns_resolver_start_query(query_job->resolver, 424 429 &srv->target_name, … … 428 433 if (status != PJ_SUCCESS) { 429 434 query_job->host_resolved++; 435 err_cnt++; 430 436 err = status; 431 437 } 432 438 } 433 439 434 return ( query_job->host_resolved== query_job->srv_cnt) ? err : PJ_SUCCESS;440 return (err_cnt == query_job->srv_cnt) ? err : PJ_SUCCESS; 435 441 } 436 442
Note: See TracChangeset
for help on using the changeset viewer.