cvs: php4 /ext/com COM.c

From: Date: Sat, 27 Apr 2002 10:17:46 +0000
Subject: cvs: php4 /ext/com COM.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11472@lists.php.net to get a copy of this message
phanto Sat Apr 27 06:17:46 2002 EDT Modified files: /php4/ext/com COM.c Log: don't set CLSCTX_REMOTE_SERVER if NULL is passed as servername Index: php4/ext/com/COM.c diff -u php4/ext/com/COM.c:1.66 php4/ext/com/COM.c:1.67 --- php4/ext/com/COM.c:1.66 Wed Apr 17 21:56:28 2002 +++ php4/ext/com/COM.c Sat Apr 27 06:17:45 2002 @@ -501,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 */ @@ -568,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); } }

« previous php.cvs (#11472) next »