summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/SAPI.c2
-rw-r--r--main/SAPI.h2
-rw-r--r--sapi/apache/mod_php5.c2
-rw-r--r--sapi/apache2filter/sapi_apache2.c3
-rw-r--r--sapi/apache2handler/sapi_apache2.c3
-rw-r--r--sapi/apache_hooks/mod_php5.c2
-rw-r--r--sapi/cgi/cgi_main.c4
-rw-r--r--sapi/cli/php_cli.c2
-rw-r--r--sapi/cli/php_cli_server.c3
-rw-r--r--sapi/embed/php_embed.c2
-rw-r--r--sapi/fpm/fpm/fpm_main.c2
-rw-r--r--sapi/litespeed/lsapi_main.c2
-rw-r--r--sapi/milter/php_milter.c6
-rw-r--r--sapi/nsapi/nsapi.c3
14 files changed, 15 insertions, 23 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index c9ba5d5dce..4cdb6f946d 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -992,7 +992,7 @@ SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, ch
SAPI_API int sapi_flush(TSRMLS_D)
{
if (sapi_module.flush) {
- sapi_module.flush(SG(server_context));
+ sapi_module.flush(SG(server_context) TSRMLS_CC);
return SUCCESS;
} else {
return FAILURE;
diff --git a/main/SAPI.h b/main/SAPI.h
index 928fca95da..3097cf1743 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -227,7 +227,7 @@ struct _sapi_module_struct {
int (*deactivate)(TSRMLS_D);
int (*ub_write)(const char *str, unsigned int str_length TSRMLS_DC);
- void (*flush)(void *server_context);
+ void (*flush)(void *server_context TSRMLS_DC);
struct stat *(*get_stat)(TSRMLS_D);
char *(*getenv)(char *name, size_t name_len TSRMLS_DC);
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c
index 8361f7f410..28039039a0 100644
--- a/sapi/apache/mod_php5.c
+++ b/sapi/apache/mod_php5.c
@@ -108,7 +108,7 @@ static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC)
/* {{{ sapi_apache_flush
*/
-static void sapi_apache_flush(void *server_context)
+static void sapi_apache_flush(void *server_context TSRMLS_DC)
{
if (server_context) {
#if MODULE_MAGIC_NUMBER > 19970110
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index 8ce490ea43..c992c1c2d3 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -245,14 +245,13 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
}
static void
-php_apache_sapi_flush(void *server_context)
+php_apache_sapi_flush(void *server_context TSRMLS_DC)
{
php_struct *ctx;
apr_bucket_brigade *bb;
apr_bucket_alloc_t *ba;
apr_bucket *b;
ap_filter_t *f; /* output filters */
- TSRMLS_FETCH();
ctx = server_context;
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index b7f95e0c12..cf1a83fa53 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -287,11 +287,10 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
}
static void
-php_apache_sapi_flush(void *server_context)
+php_apache_sapi_flush(void *server_context TSRMLS_DC)
{
php_struct *ctx;
request_rec *r;
- TSRMLS_FETCH();
ctx = server_context;
diff --git a/sapi/apache_hooks/mod_php5.c b/sapi/apache_hooks/mod_php5.c
index 66adb482ed..4827932c7d 100644
--- a/sapi/apache_hooks/mod_php5.c
+++ b/sapi/apache_hooks/mod_php5.c
@@ -253,7 +253,7 @@ static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC)
/* {{{ sapi_apache_flush
*/
-static void sapi_apache_flush(void *server_context)
+static void sapi_apache_flush(void *server_context TSRMLS_DC)
{
if (server_context) {
#if MODULE_MAGIC_NUMBER > 19970110
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 66ecce60c0..6fc5a86d12 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -324,14 +324,14 @@ static int sapi_fcgi_ub_write(const char *str, uint str_length TSRMLS_DC)
return str_length;
}
-static void sapi_cgi_flush(void *server_context)
+static void sapi_cgi_flush(void *server_context TSRMLS_DC)
{
if (fflush(stdout) == EOF) {
php_handle_aborted_connection();
}
}
-static void sapi_fcgi_flush(void *server_context)
+static void sapi_fcgi_flush(void *server_context TSRMLS_DC)
{
fcgi_request *request = (fcgi_request*) server_context;
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 2fd3dbed10..cb52cd7072 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -320,7 +320,7 @@ static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{
}
/* }}} */
-static void sapi_cli_flush(void *server_context) /* {{{ */
+static void sapi_cli_flush(void *server_context TSRMLS_DC) /* {{{ */
{
/* Ignore EBADF here, it's caused by the fact that STDIN/STDOUT/STDERR streams
* are/could be closed before fflush() is called.
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 77e4d09ba0..89f20f6358 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -614,10 +614,9 @@ static int sapi_cli_server_ub_write(const char *str, uint str_length TSRMLS_DC)
return php_cli_server_client_send_through(client, str, str_length);
} /* }}} */
-static void sapi_cli_server_flush(void *server_context) /* {{{ */
+static void sapi_cli_server_flush(void *server_context TSRMLS_DC) /* {{{ */
{
php_cli_server_client *client = server_context;
- TSRMLS_FETCH();
if (!client) {
return;
diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c
index 414b4dbb02..66961ec6ef 100644
--- a/sapi/embed/php_embed.c
+++ b/sapi/embed/php_embed.c
@@ -79,7 +79,7 @@ static int php_embed_ub_write(const char *str, uint str_length TSRMLS_DC)
return str_length;
}
-static void php_embed_flush(void *server_context)
+static void php_embed_flush(void *server_context TSRMLS_DC)
{
if (fflush(stdout)==EOF) {
php_handle_aborted_connection();
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 91abfea959..e1c8ff081a 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -315,7 +315,7 @@ static int sapi_cgibin_ub_write(const char *str, uint str_length TSRMLS_DC)
}
-static void sapi_cgibin_flush(void *server_context)
+static void sapi_cgibin_flush(void *server_context TSRMLS_DC)
{
/* fpm has started, let use fcgi instead of stdout */
if (fpm_is_running) {
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index 1626dcb84d..850433d29c 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -157,7 +157,7 @@ static int sapi_lsapi_ub_write(const char *str, uint str_length TSRMLS_DC)
/* {{{ sapi_lsapi_flush
*/
-static void sapi_lsapi_flush( void * server_context )
+static void sapi_lsapi_flush( void * server_context TSRMLS_DC )
{
if ( lsapi_mode ) {
if ( LSAPI_Flush() == -1) {
diff --git a/sapi/milter/php_milter.c b/sapi/milter/php_milter.c
index 7e8662fc19..f0ce1b02f7 100644
--- a/sapi/milter/php_milter.c
+++ b/sapi/milter/php_milter.c
@@ -860,10 +860,6 @@ static int sapi_milter_ub_write(const char *str, uint str_length TSRMLS_DC)
return str_length;
}
-static void sapi_milter_flush(void *server_context)
-{
-}
-
static void sapi_milter_register_variables(zval *track_vars_array TSRMLS_DC)
{
php_register_variable ("SERVER_SOFTWARE", "Sendmail Milter", track_vars_array TSRMLS_CC);
@@ -906,7 +902,7 @@ static sapi_module_struct milter_sapi_module = {
NULL, /* deactivate */
sapi_milter_ub_write, /* unbuffered write */
- sapi_milter_flush, /* flush */
+ NULL, /* flush */
NULL, /* get uid */
NULL, /* getenv */
diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c
index 1e6a680c91..ee0f4b09cf 100644
--- a/sapi/nsapi/nsapi.c
+++ b/sapi/nsapi/nsapi.c
@@ -467,10 +467,9 @@ static int sapi_nsapi_ub_write(const char *str, unsigned int str_length TSRMLS_D
}
/* modified version of apache2 */
-static void sapi_nsapi_flush(void *server_context)
+static void sapi_nsapi_flush(void *server_context TSRMLS_DC)
{
nsapi_request_context *rc = (nsapi_request_context *)server_context;
- TSRMLS_FETCH();
if (!rc) {
/* we have no context, so no flushing needed. This fixes a SIGSEGV on shutdown */