cvs: php-src(PHP_5_3) /ext/standard dns.c /ext/standard/tests/network getmxrr.phpt

From: Date: Thu, 22 Nov 2007 10:20:09 +0000
Subject: cvs: php-src(PHP_5_3) /ext/standard dns.c /ext/standard/tests/network getmxrr.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-47278@lists.php.net to get a copy of this message
derick Thu Nov 22 10:20:09 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/network getmxrr.phpt Modified files: /php-src/ext/standard dns.c Log: - MFH: Fixed weights array, which was broken with: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.80&r2=1.81 and merged to head with: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.5&r2=1.70.2.7.2.5.2.1 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.5.2.1&r2=1.70.2.7.2.5.2.2&diff_format=u Index: php-src/ext/standard/dns.c diff -u php-src/ext/standard/dns.c:1.70.2.7.2.5.2.1 php-src/ext/standard/dns.c:1.70.2.7.2.5.2.2 --- php-src/ext/standard/dns.c:1.70.2.7.2.5.2.1 Mon Nov 5 13:42:33 2007 +++ php-src/ext/standard/dns.c Thu Nov 22 10:20:09 2007 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.70.2.7.2.5.2.1 2007/11/05 13:42:33 jani Exp $ */ +/* $Id: dns.c,v 1.70.2.7.2.5.2.2 2007/11/22 10:20:09 derick Exp $ */ /* {{{ includes */ #include "php.h" @@ -836,7 +836,6 @@ char *hostname; int hostname_len; zval *mx_list, *weight_list = NULL; - int need_weight = 0; int count, qdc; u_short type, weight; u_char ans[MAXPACKET]; @@ -891,7 +890,7 @@ } cp += i; add_next_index_string(mx_list, buf, 1); - if (need_weight) { + if (weight_list) { add_next_index_long(weight_list, weight); } } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/getmxrr.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/network/getmxrr.phpt +++ php-src/ext/standard/tests/network/getmxrr.phpt --TEST-- dns_check_record() segfault with empty host --FILE-- <?php $domains = array( 'php.net', 'ez.no' ); foreach ( $domains as $domain ) { if ( getmxrr( $domain, $hosts, $weights ) ) { echo "Hosts: " . count( $hosts ) . ", weights: " . count( $weights ) . "\n"; } } ?> --EXPECT-- Hosts: 2, weights: 2 Hosts: 1, weights: 1

« previous php.cvs (#47278) next »