cvs: php4 /main main.c php_main.h

From: Date: Sun, 29 Oct 2000 16:00:42 +0000
Subject: cvs: php4 /main main.c php_main.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2340@lists.php.net to get a copy of this message
sas Sun Oct 29 08:00:42 2000 EDT Modified files: /php4/main main.c php_main.h Log: Add php_handle_aborted_connection() Call this from your SAPI module to signal an aborted connection. Index: php4/main/main.c diff -u php4/main/main.c:1.332 php4/main/main.c:1.333 --- php4/main/main.c:1.332 Sun Oct 29 03:54:51 2000 +++ php4/main/main.c Sun Oct 29 08:00:42 2000 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.332 2000/10/29 11:54:51 zeev Exp $ */ +/* $Id: main.c,v 1.333 2000/10/29 16:00:42 sas Exp $ */ #include <stdio.h> @@ -1212,6 +1212,17 @@ if (old_cwd[0] != '\0') V_CHDIR(old_cwd); free_alloca(old_cwd); +} + +PHPAPI void php_handle_aborted_connection(void) +{ + PLS_FETCH(); + + PG(connection_status) = PHP_CONNECTION_ABORTED; + + if (!PG(ignore_user_abort)) { + zend_bailout(); + } } PHPAPI int php_handle_auth_data(const char *auth SLS_DC) Index: php4/main/php_main.h diff -u php4/main/php_main.h:1.5 php4/main/php_main.h:1.6 --- php4/main/php_main.h:1.5 Fri Oct 27 03:16:54 2000 +++ php4/main/php_main.h Sun Oct 29 08:00:42 2000 @@ -18,7 +18,7 @@ */ -/* $Id: php_main.h,v 1.5 2000/10/27 10:16:54 sas Exp $ */ +/* $Id: php_main.h,v 1.6 2000/10/29 16:00:42 sas Exp $ */ #ifndef PHP_MAIN_H @@ -44,6 +44,7 @@ PHPAPI int php_handle_special_queries(SLS_D PLS_DC); PHPAPI int php_lint_script(zend_file_handle *file CLS_DC ELS_DC PLS_DC); +PHPAPI void php_handle_aborted_connection(void); PHPAPI int php_handle_auth_data(const char *auth SLS_DC); extern void php_call_shutdown_functions(void);

« previous php.cvs (#2340) next »