clean_module_constants(module->module_number);
}
- if (module->request_started && module->request_shutdown_func) {
+ if (module->request_shutdown_func) {
#if 0
zend_printf("%s: Request shutdown\n",module->name);
#endif
module->request_shutdown_func(module->type, module->module_number);
}
- module->request_started=0;
if (module->module_started && module->module_shutdown_func) {
#if 0
zend_printf("%s: Module shutdown\n",module->name);
/* call request startup for all modules */
int module_registry_request_startup(zend_module_entry *module)
{
- if (!module->request_started && module->request_startup_func) {
+ if (module->request_startup_func) {
#if 0
zend_printf("%s: Request startup\n",module->name);
#endif
- module->request_startup_func(module->type, module->module_number);
+ if (module->request_startup_func(module->type, module->module_number)==FAILURE) {
+ zend_error(E_WARNING, "request_startup() for %s module failed", module->name);
+ exit(1);
+ }
}
- module->request_started=1;
return 0;
}
{
switch(module->type) {
case MODULE_PERSISTENT:
- if (module->request_started && module->request_shutdown_func) {
+ if (module->request_shutdown_func) {
#if 0
zend_printf("%s: Request shutdown\n",module->name);
#endif
module->request_shutdown_func(module->type, module->module_number);
}
- module->request_started=0;
return 0;
break;
case MODULE_TEMPORARY:
#define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
-#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0
+#define STANDARD_MODULE_PROPERTIES_EX 0, 0, NULL, 0
#define STANDARD_MODULE_PROPERTIES \
NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
int (*global_startup_func)(void);
int (*global_shutdown_func)(void);
- int request_started, module_started;
+ int module_started;
unsigned char type;
void *handle;
int module_number;