summaryrefslogtreecommitdiff
path: root/sapi/apache/mod_php4.c
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2002-11-26 05:15:55 +0000
committerSascha Schumann <sas@php.net>2002-11-26 05:15:55 +0000
commit09f463ddae79c53a065d28da61a33fda96669f84 (patch)
tree6a15768f41099cf790428c6fb999956610cabe31 /sapi/apache/mod_php4.c
parentf0b6f5450ca8888f79a4fb2ab77b628b3c49120f (diff)
downloadphp-git-09f463ddae79c53a065d28da61a33fda96669f84.tar.gz
Add sapi_get_fd() and implement it for the Apache/thttpd SAPIs.
Diffstat (limited to 'sapi/apache/mod_php4.c')
-rw-r--r--sapi/apache/mod_php4.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index ce060e3c75..eac37883a7 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -343,6 +343,23 @@ static char *php_apache_getenv(char *name, size_t name_len TSRMLS_DC)
}
/* }}} */
+/* {{{ sapi_apache_get_fd
+ */
+static int sapi_apache_get_fd(int *nfd TSRMLS_DC)
+{
+ request_rec *r = SG(server_context);
+ int fd;
+
+ fd = r->connection->client->fd;
+
+ if (fd >= 0) {
+ if (nfd) *nfd = fd;
+ return 0;
+ }
+ return -1;
+}
+/* }}} */
+
/* {{{ sapi_module_struct apache_sapi_module
*/
static sapi_module_struct apache_sapi_module = {
@@ -382,7 +399,11 @@ static sapi_module_struct apache_sapi_module = {
unblock_alarms, /* Unblock interruptions */
#endif
- STANDARD_SAPI_MODULE_PROPERTIES
+ NULL, /* default post reader */
+ NULL, /* treat data */
+ NULL, /* exe location */
+ 0, /* ini ignore */
+ sapi_apache_get_fd
};
/* }}} */