cvs: php4 /sapi/caudium caudium.c

From: Date: Mon, 04 Dec 2000 23:12:41 +0000
Subject: cvs: php4 /sapi/caudium caudium.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2945@lists.php.net to get a copy of this message
neotron Mon Dec 4 15:12:41 2000 EDT Modified files: /php4/sapi/caudium caudium.c Log: Removed a fatal condition to allow for harmless user error plus some other small changes. Index: php4/sapi/caudium/caudium.c diff -u php4/sapi/caudium/caudium.c:1.5 php4/sapi/caudium/caudium.c:1.6 --- php4/sapi/caudium/caudium.c:1.5 Fri Nov 17 18:44:02 2000 +++ php4/sapi/caudium/caudium.c Mon Dec 4 15:12:40 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: caudium.c,v 1.5 2000/11/18 02:44:02 zeev Exp $ */ +/* $Id: caudium.c,v 1.6 2000/12/04 23:12:40 neotron Exp $ */ #include "php.h" #ifdef HAVE_CAUDIUM @@ -450,7 +450,7 @@ { /* char buf[512]; */ php_info_print_table_start(); - php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.5 2000/11/18 02:44:02 zeev Exp $"); + php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.6 2000/12/04 23:12:40 neotron Exp $"); /* php_info_print_table_row(2, "Build date", Ns_InfoBuildDate()); php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile()); php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog()); @@ -481,18 +481,8 @@ STANDARD_MODULE_PROPERTIES }; -static int php_caudium_startup(sapi_module_struct *sapi_module) -{ - if(php_module_startup(sapi_module) == FAILURE - || zend_startup_module(&php_caudium_module) == FAILURE) { - return FAILURE; - } else { - return SUCCESS; - } -} /* this structure is static (as in "it does not change") */ - static sapi_module_struct sapi_module = { "caudium", "Caudium", @@ -506,10 +496,10 @@ NULL, /* getenv */ php_error, /* error handler */ php_caudium_sapi_header_handler, /* header handler */ - php_caudium_sapi_send_headers, /* send headers handler */ + php_caudium_sapi_send_headers, /* send headers handler */ NULL, /* send header handler */ php_caudium_sapi_read_post, /* read POST data */ - php_caudium_sapi_read_cookies, /* read Cookies */ + php_caudium_sapi_read_cookies, /* read cookies */ NULL, /* register server variables */ NULL, /* Log message */ NULL, /* Block interruptions */ @@ -747,8 +737,9 @@ { int fd = fd_from_object(raw_fd->u.object); if(fd == -1) - error("PHP4.Interpreter->run: my_fd object not open or not an FD.\n"); - THIS->my_fd = fd; + THIS->my_fd = 0; /* Don't send directly to this FD... */ + else + THIS->my_fd = fd; } else THIS->my_fd = 0; #ifdef TEST_NO_THREADS @@ -779,13 +770,12 @@ void pike_module_init( void ) { if (!caudium_php_initialized) { -#ifdef ZTS + caudium_php_initialized = 1; tsrm_startup(1, 1, 0, NULL); caudium_globals_id = ts_allocate_id(sizeof(php_caudium_request), NULL, NULL); -#endif sapi_startup(&sapi_module); - php_caudium_startup(&sapi_module); - caudium_php_initialized = 1; + sapi_module.startup(&sapi_module); + zend_startup_module(&php_caudium_module); PHP_INIT_LOCK(); } start_new_program(); /* Text */ @@ -804,9 +794,7 @@ caudium_php_initialized = 0; sapi_module.shutdown(&sapi_module); if(php_program) free_program(php_program); -#ifdef ZTS tsrm_shutdown(); -#endif PHP_DESTROY(); } #endif

« previous php.cvs (#2945) next »