pajoye          Wed Jan  7 01:35:36 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/standard       dns_win32.c 
  Log:
  - sanity check if we got an A as well (valid too but not desired)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns_win32.c?r1=1.1.2.3&r2=1.1.2.4&diff_format=u
Index: php-src/ext/standard/dns_win32.c
diff -u php-src/ext/standard/dns_win32.c:1.1.2.3 
php-src/ext/standard/dns_win32.c:1.1.2.4
--- php-src/ext/standard/dns_win32.c:1.1.2.3    Tue Jan  6 23:23:28 2009
+++ php-src/ext/standard/dns_win32.c    Wed Jan  7 01:35:36 2009
@@ -71,6 +71,10 @@
        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 @@
        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;
        }
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to