]> granicus.if.org Git - php/commitdiff
- sanity check if we got an A as well (valid too but not desired)
authorPierre Joye <pajoye@php.net>
Wed, 7 Jan 2009 01:35:36 +0000 (01:35 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 7 Jan 2009 01:35:36 +0000 (01:35 +0000)
ext/standard/dns_win32.c

index 289f20d399bda0ee247f9a7812057d3a2bfdc60d..07bd362cf21e81e56e45753ba7fa95327f955791 100644 (file)
@@ -71,6 +71,10 @@ PHP_FUNCTION(dns_get_mx) /* {{{ */
        for (pRec = pResult; pRec; pRec = pRec->pNext) {
                DNS_SRV_DATA *srv = &pRec->Data.Srv;
 
+               if (pRec->wType != DNS_TYPE_MX) {
+                       continue;
+               }
+
                add_next_index_string(mx_list, pRec->Data.MX.pNameExchange, 1);
                if (weight_list) {
                        add_next_index_long(weight_list, srv->wPriority);
@@ -296,7 +300,7 @@ PHP_FUNCTION(dns_get_record)
        int addtl_recs = 0;
        IN_ADDR ipaddr;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz!z!", &hostname, &hostname_len, &type_param, &authns, &addtl) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lzz", &hostname, &hostname_len, &type_param, &authns, &addtl) == FAILURE) {
                return;
        }