cvs: php4(PHP_4_2_0) /sapi/apache2filter sapi_apache2.c
| From: | Aaron Bannert | Date: | Thu, 11 Apr 2002 17:32:41 +0000 |
| Subject: | cvs: php4(PHP_4_2_0) /sapi/apache2filter sapi_apache2.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11047@lists.php.net to get a copy of this message | ||
aaron Thu Apr 11 13:32:41 2002 EDT
Modified files: (Branch: PHP_4_2_0)
/php4/sapi/apache2filter sapi_apache2.c
Log:
Don't depend on the context provided by the filter (f->ctx) anymore. In
Apache 2 the input and output filter contexts are kept unique. We now
only depend on SG(server_context) for each request, and assume that
the same thread will process the entire request. At some point it
would be wise to separate the input and output contexts.
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.61.2.5
php4/sapi/apache2filter/sapi_apache2.c:1.61.2.6
--- php4/sapi/apache2filter/sapi_apache2.c:1.61.2.5 Thu Apr 11 13:18:48 2002
+++ php4/sapi/apache2filter/sapi_apache2.c Thu Apr 11 13:32:37 2002
@@ -252,9 +252,7 @@
return ap_get_brigade(f->next, bb, mode, block, readbytes);
}
- ctx = SG(server_context);
-
- if (ctx == NULL) {
+ if (SG(server_context) == NULL) {
/* Initialize filter context */
SG(server_context) = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx));
}
@@ -330,9 +328,9 @@
ap_add_common_vars(f->r);
ap_add_cgi_vars(f->r);
- if (f->ctx == NULL) {
+ if (SG(server_context) == NULL) {
/* Initialize filter context */
- f->ctx = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx));
+ SG(server_context) = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx));
ctx->f = f;
}
@@ -365,7 +363,6 @@
}
}
- SG(server_context) = ctx;
apply_config(conf);
php_apache_request_ctor(f, ctx TSRMLS_CC);