pollita         Fri Nov 22 20:09:08 2002 EDT

  Modified files:              
    /php4/ext/standard  dns.c 
  Log:
  New function dns_get_record(): close resolver socket after use.
  fix to internal func php_parserr(): correct bug in return state.
  
  
Index: php4/ext/standard/dns.c
diff -u php4/ext/standard/dns.c:1.45 php4/ext/standard/dns.c:1.46
--- php4/ext/standard/dns.c:1.45        Mon Nov 18 21:34:13 2002
+++ php4/ext/standard/dns.c     Fri Nov 22 20:09:07 2002
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: dns.c,v 1.45 2002/11/19 02:34:13 helly Exp $ */
+/* $Id: dns.c,v 1.46 2002/11/23 01:09:07 pollita Exp $ */
 
 /* {{{ includes */
 #include "php.h"
@@ -331,8 +331,9 @@
        GETLONG(ttl, cp);
        GETSHORT(dlen, cp);
        if (type_to_fetch != T_ANY && type != type_to_fetch) {
-               /* Should never actually occour */
-               return NULL;
+               *subarray = NULL;
+               cp += dlen;
+               return cp;
        }
 
        if (!store) {
@@ -576,6 +577,7 @@
                                        
zend_hash_next_index_insert(HASH_OF(return_value), (void 
*)&subarray[current_subarray], sizeof(zval *), NULL);
                                current_subarray++;
                        }
+                       res_nclose(&res);
                }
        }
 



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

Reply via email to