[Wsf-c-commits] svn commit r13201 - trunk/wsf/php/src
svn at wso2.org
svn at wso2.org
Thu Jan 31 01:47:12 PST 2008
Author: nandika
Date: Thu Jan 31 01:47:08 2008
New Revision: 13201
Log:
bug fixed
Modified:
trunk/wsf/php/src/wsf_wsdl.c
Modified: trunk/wsf/php/src/wsf_wsdl.c
==============================================================================
--- trunk/wsf/php/src/wsf_wsdl.c (original)
+++ trunk/wsf/php/src/wsf_wsdl.c Thu Jan 31 01:47:08 2008
@@ -79,7 +79,8 @@
zval *user_parameters;
zval *function_parameters;
php_stream *stream;
- FILE *new_fp;
+ FILE *new_fp;
+ int script_executed = 0;
if (instanceof_function (Z_OBJCE_P (this_ptr),
@@ -140,23 +141,33 @@
ZVAL_ZVAL(params[1], function_parameters, NULL, NULL);
INIT_PZVAL(params[1]);
- script.type = ZEND_HANDLE_FP;
- script.filename = "wsf_wsdl.php";
- script.opened_path = NULL;
- script.free_filename = 0;
-
-
- stream = php_stream_open_wrapper("wsf_wsdl.php", "rb", USE_PATH|REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
- if(!stream)
- return;
-
- if (php_stream_cast(stream, PHP_STREAM_AS_STDIO|PHP_STREAM_CAST_RELEASE, (void*)&new_fp, REPORT_ERRORS) == FAILURE) {
- php_printf ("Unable to open script file or file not found:");
- }
- script.handle.fp = new_fp;
-
- if(script.handle.fp){
- php_lint_script (&script TSRMLS_CC);
+ if(zend_hash_find(Z_OBJPROP_P(this_ptr), "SCRIPT_EXECUTED", sizeof("SCRIPT_EXECUTED"), (void**)&tmp) == SUCCESS){
+ if(Z_TYPE_PP(tmp) == IS_BOOL && Z_BVAL_PP(tmp) == 1){
+ script_executed = 1;
+ }
+ }
+ if(!script_executed){
+ script.type = ZEND_HANDLE_FP;
+ script.filename = "wsf_wsdl.php";
+ script.opened_path = NULL;
+ script.free_filename = 0;
+
+
+ stream = php_stream_open_wrapper("wsf_wsdl.php", "rb", USE_PATH|REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+ if(!stream)
+ return;
+
+ if (php_stream_cast(stream, PHP_STREAM_AS_STDIO|PHP_STREAM_CAST_RELEASE, (void*)&new_fp, REPORT_ERRORS) == FAILURE) {
+ php_printf ("Unable to open script file or file not found:");
+ }
+ script.handle.fp = new_fp;
+ if(script.handle.fp){
+ php_lint_script (&script TSRMLS_CC);
+ add_property_bool(this_ptr, "SCRIPT_EXECUTED", 1);
+ script_executed = 1;
+ }
+ }
+ if(script_executed){
if (call_user_function (EG (function_table), (zval **) NULL,
&request_function, &retval, 2,
params TSRMLS_CC) == SUCCESS ){
More information about the Wsf-c-commits
mailing list