summaryrefslogtreecommitdiff
path: root/mod_php4.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>1999-09-04 20:12:47 +0000
committerRasmus Lerdorf <rasmus@php.net>1999-09-04 20:12:47 +0000
commit0bede914ab627eb1fb955f08a300f8b21296eab9 (patch)
treec5365c8b9fbc82507d4477ddbcd45fb8d4c91191 /mod_php4.c
parent8e9cd1e4aeb2750a177cfc83e63341de34dd062c (diff)
downloadphp-git-0bede914ab627eb1fb955f08a300f8b21296eab9.tar.gz
First part of the connection_status work. No user-callable functions
yet. That is coming next. Have also only done Apache and CGI so far. Will have to crack open my ISAPI book to do that one. Also changed the SAPI output functions to return an int. We'll check the connection status inside each one, but we might need the return code at some other level and I don't see a good reason for just tossing these return codes.
Diffstat (limited to 'mod_php4.c')
-rw-r--r--mod_php4.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/mod_php4.c b/mod_php4.c
index bba5776a22..65d52df220 100644
--- a/mod_php4.c
+++ b/mod_php4.c
@@ -94,12 +94,17 @@ void php_save_umask()
static int zend_apache_ub_write(const char *str, uint str_length)
{
SLS_FETCH();
-
+ int ret;
+
if (SG(server_context)) {
- return rwrite(str, str_length, (request_rec *) SG(server_context));
+ ret = rwrite(str, str_length, (request_rec *) SG(server_context));
} else {
- return fwrite(str, 1, str_length, stdout);
+ ret = fwrite(str, 1, str_length, stdout);
+ }
+ if(ret != str_length) {
+ PG(connection_status) = PHP_CONNECTION_ABORTED;
}
+ return ret;
}
@@ -466,7 +471,7 @@ int php_xbithack_handler(request_rec * r)
return send_parsed_php(r);
}
-static void apache_php_module_shutdown_wrapper()
+static void apache_php_module_shutdown_wrapper(void)
{
apache_php_initialized = 0;
sapi_module.shutdown(&sapi_module);