Home » Networking » Net_DNS » Bug #7034
error in send_udp_no_sock_lib
Details
| Submitted | 2006-03-06 16:02 UTC |
|---|---|
| From | info at arcert dot gov dot ar |
| Assigned | bate |
| Status | Closed |
| Package | Net_DNS |
| PHP Version | 4.3.10 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-03-06 16:02 UTC] info at arcert dot gov dot ar
Description:
------------
There is a minor bug in the "send_udp_no_sock_lib" (Resolver.php)
In the line 854 ..we can read ..
....
for ($i = 0; $i < $this->retry; $i++, $retrans *= 2,
$timeout = (int) ($retrans / (count($ns)+1))) {
if ($timeout < 1) {
....
the "$ns" variable doesn't exist and I think that it would be replaced for "$ctr" .. like in line 966 of the "send_udp_with_sock_lib" function.
BTW, you can rewrite this section of the code too look similar in the two functions.
I hope to have been clear,
Regards.
Test script:
---------------
--- Resolver.php 2006-03-06 12:19:19.000000000 -0300
+++ Resolver.php.new 2006-03-06 12:17:12.000000000 -0300
@@ -854,7 +854,7 @@
}
for ($i = 0; $i < $this->retry; $i++, $retrans *= 2,
- $timeout = (int) ($retrans / (count($ns)+1))) {
+ $timeout = (int) ($retrans / $ctr) {
if ($timeout < 1) {
$timeout = 1;
}