- (5.3) Fixed bug in the Windows implementation of
dns_get_record, where the two last parameters wouldn't be
filled unless the type were DNS_ANY (Gustavo).
int hostname_len;
long type_param = PHP_DNS_ANY;
zval *authns = NULL, *addtl = NULL;
- int addtl_recs = 0;
int type_to_fetch;
#if defined(HAVE_DNS_SEARCH)
struct sockaddr_storage from;
if (addtl) {
zval_dtor(addtl);
array_init(addtl);
- addtl_recs = 1;
}
if (!raw) {
}
for ( ;
- type < (addtl_recs ? (PHP_DNS_NUM_TYPES + 2) : PHP_DNS_NUM_TYPES) || first_query;
+ type < (addtl ? (PHP_DNS_NUM_TYPES + 2) : PHP_DNS_NUM_TYPES) || first_query;
type++
) {
first_query = 0;
}
}
- if (addtl_recs && addtl) {
+ if (addtl) {
/* Additional records associated with authoritative name servers */
while (ar-- > 0 && cp && cp < end) {
zval *retval = NULL;
long type_param = PHP_DNS_ANY;
zval *authns = NULL, *addtl = NULL;
int type, type_to_fetch, first_query = 1, store_results = 1;
- int addtl_recs = 0;
zend_bool raw = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz!z!b",
if (addtl) {
zval_dtor(addtl);
array_init(addtl);
- addtl_recs = 1;
}
if (!raw) {
}
for ( ;
- type < (addtl_recs ? (PHP_DNS_NUM_TYPES + 2) : PHP_DNS_NUM_TYPES) || first_query;
+ type < (addtl ? (PHP_DNS_NUM_TYPES + 2) : PHP_DNS_NUM_TYPES) || first_query;
type++
) {
DNS_STATUS status; /* Return value of DnsQuery_A() function */