diff options
Diffstat (limited to 'sapi')
| -rw-r--r-- | sapi/apache/mod_php4.c | 23 | ||||
| -rw-r--r-- | sapi/thttpd/thttpd.c | 12 |
2 files changed, 33 insertions, 2 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 }; /* }}} */ diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c index 4f196973ca..96ba377aec 100644 --- a/sapi/thttpd/thttpd.c +++ b/sapi/thttpd/thttpd.c @@ -382,6 +382,12 @@ static int php_thttpd_startup(sapi_module_struct *sapi_module) return SUCCESS; } +static int sapi_thttpd_get_fd(int *nfd TSRMLS_DC) +{ + if (nfd) *nfd = TG(hc)->conn_fd; + return 0; +} + static sapi_module_struct thttpd_sapi_module = { "thttpd", "thttpd", @@ -411,7 +417,11 @@ static sapi_module_struct thttpd_sapi_module = { NULL, /* Block interruptions */ NULL, /* Unblock interruptions */ - STANDARD_SAPI_MODULE_PROPERTIES + NULL, + NULL, + NULL, + 0, + sapi_thttpd_get_fd }; static void thttpd_module_main(int show_source TSRMLS_DC) |
