[PHP4BETA] CVS update: php4/ext/standard
| From: | zeev | Date: | Sun, 23 May 1999 20:32:20 +0000 |
| Subject: | [PHP4BETA] CVS update: php4/ext/standard | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-1009@lists.php.net to get a copy of this message | ||
Date: Sunday May 23, 1999 @ 16:32
Author: zeev
Update of /repository/php4/ext/standard
In directory php:/tmp/cvs-serv6305/ext/standard
Modified Files:
dns.c
Log Message:
Thou shalt use the API, and thou shalt be safe
Index: php4/ext/standard/dns.c
diff -u php4/ext/standard/dns.c:1.4 php4/ext/standard/dns.c:1.5
--- php4/ext/standard/dns.c:1.4 Sun May 16 07:19:25 1999
+++ php4/ext/standard/dns.c Sun May 23 16:32:19 1999
@@ -28,7 +28,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dns.c,v 1.4 1999/05/16 11:19:25 sas Exp $ */
+/* $Id: dns.c,v 1.5 1999/05/23 20:32:19 zeev Exp $ */
#include "php.h"
#if HAVE_SYS_SOCKET_H
@@ -237,7 +237,6 @@
PHP_FUNCTION(getmxrr)
{
pval *host, *mx_list, *weight_list;
- pval tmp1,tmp2;
int need_weight = 0;
int count,qdc;
u_short type,weight;
@@ -313,14 +312,9 @@
RETURN_FALSE;
}
cp += i;
- tmp1.value.str.len = strlen(buf);
- tmp1.value.str.val = estrndup(buf,tmp1.value.str.len);
- tmp1.type = IS_STRING;
- _php3_hash_next_index_insert(mx_list->value.ht, (void *)&tmp1, sizeof(pval), NULL);
+ add_next_index_string(mx_list, buf, 1);
if ( need_weight ) {
- tmp2.value.lval = (long)weight;
- tmp2.type = IS_LONG;
- _php3_hash_next_index_insert(weight_list->value.ht, (void *)&tmp2, sizeof(pval), NULL);
+ add_next_index_long(weight_list, weight);
}
}
RETURN_TRUE;
--
PHP 4 Beta