cvs: php4(PHP_4_2_0) /ext/com COM.c com.h
| From: | Harald Radi | Date: | Sat, 27 Apr 2002 10:28:53 +0000 |
| Subject: | cvs: php4(PHP_4_2_0) /ext/com COM.c com.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11473@lists.php.net to get a copy of this message | ||
phanto Sat Apr 27 06:28:53 2002 EDT
Modified files: (Branch: PHP_4_2_0)
/php4/ext/com COM.c com.h
Log:
MFH
Index: php4/ext/com/COM.c
diff -u php4/ext/com/COM.c:1.64.2.2 php4/ext/com/COM.c:1.64.2.3
--- php4/ext/com/COM.c:1.64.2.2 Thu Apr 18 06:15:30 2002
+++ php4/ext/com/COM.c Sat Apr 27 06:28:51 2002
@@ -133,6 +133,7 @@
if (FAILED(hr)) {
switch (hr) {
case DISP_E_EXCEPTION: {
+
char *src=estrdup("Unavailable");
int srclen=strlen(src);
char *desc=estrdup("Unavailable");
@@ -500,14 +501,11 @@
}
if (server_name != NULL) {
- /* if a server is passed, one obviously wants to instanciate a
- * remote server
- */
- flags = CLSCTX_REMOTE_SERVER;
-
/* What is server name? A String or an array? */
- if (Z_TYPE_P(server_name) == IS_ARRAY) {
+ if (Z_TYPE_P(server_name) == IS_NULL) {
+ server_name = NULL;
+ } else if (Z_TYPE_P(server_name) == IS_ARRAY) {
pval **tmp;
/* DAB: 22 Sept 2001 */
/* Aha - we have a number of possible */
@@ -567,14 +565,12 @@
convert_to_long_ex(tmp);
flags = (CLSCTX) Z_LVAL_PP(tmp);
}
- }
- if (Z_TYPE_P(server_name) == IS_NULL) {
- server_name = NULL;
} else {
if (!INI_INT("com.allow_dcom")) {
php_error(E_WARNING, "DCOM is disabled");
RETURN_FALSE;
} else {
+ flags = CLSCTX_REMOTE_SERVER;
convert_to_string_ex(&server_name);
}
}
Index: php4/ext/com/com.h
diff -u php4/ext/com/com.h:1.10 php4/ext/com/com.h:1.10.4.1
--- php4/ext/com/com.h:1.10 Mon Aug 13 19:39:10 2001
+++ php4/ext/com/com.h Sat Apr 27 06:28:51 2002
@@ -30,8 +30,7 @@
ALLOC_HASHTABLE(properties); \
zend_hash_init(properties, 0, NULL, ZVAL_PTR_DTOR, 0); \
\
- ALLOC_ZVAL(handle); \
- INIT_PZVAL(handle); \
+ MAKE_STD_ZVAL(handle); \
ZVAL_LONG(handle, zend_list_insert((o), IS_COM)); \
\
zval_copy_ctor(handle); \
@@ -46,7 +45,7 @@
#define ALLOC_COM(z) (z) = (comval *) emalloc(sizeof(comval)); \
C_REFCOUNT(z) = 0;
-#define FREE_COM(z) efree(z);
+#define FREE_COM(z) php_COM_destruct(z TSRMLS_CC);
#define IS_COM php_COM_get_le_comval()