httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject [PATCH] Re: PHP Apache2Filter
Date Sun, 20 Jan 2002 18:44:22 GMT
On Sun, Jan 20, 2002 at 06:37:07PM +0100, Sebastian Bergmann wrote:
> Ian Holsman wrote:
> > no changes to apxs for a long time.
> 
>   Never mind, it turned out to be a probelm solved by 'make clean'. Sorry
>   for bothering with this one.
> 
>   Now I'm getting
> 
> sapi_apache2.c: In function `php_input_filter':
> sapi_apache2.c:252: incompatible type for argument 4 of `ap_get_brigade'
> sapi_apache2.c:252: too few arguments to function `ap_get_brigade'
> sapi_apache2.c:259: incompatible type for argument 4 of `ap_get_brigade'
> sapi_apache2.c:259: too few arguments to function `ap_get_brigade'
> sapi_apache2.c: In function `php_register_hook':
> sapi_apache2.c:474: warning: passing arg 2 of `ap_register_input_filter'
> from incompatible pointer type
> 
>   This looks like an API change. What should be done here?

The input filtering now has the blocking mode split out.  I also 
tried to make the filtering modes more explicit.

In PHP4's case, it looks like it doesn't care what the modes are,
so the following patch looks sufficient.  HTH.

Also, be aware that the *readbytes may change to readbytes.  I
don't know who has commit access to PHP, but it'd be nice if
someone over there applied the following for now.  =)  -- justin

Index: sapi/apache2filter/sapi_apache2.c
===================================================================
RCS file: /repository/php4/sapi/apache2filter/sapi_apache2.c,v
retrieving revision 1.59
diff -u -r1.59 sapi_apache2.c
--- sapi/apache2filter/sapi_apache2.c	11 Dec 2001 15:31:56 -0000	1.59
+++ sapi/apache2filter/sapi_apache2.c	20 Jan 2002 18:43:15 -0000
@@ -238,7 +238,8 @@
 	}
 
 static int php_input_filter(ap_filter_t *f, apr_bucket_brigade *bb, 
-		ap_input_mode_t mode, apr_off_t *readbytes)
+		ap_input_mode_t mode, apr_read_type_e block, 
+		apr_off_t *readbytes)
 {
 	php_struct *ctx;
 	long old_index;
@@ -249,14 +250,15 @@
 	TSRMLS_FETCH();
 
 	if (f->r->proxyreq) {
-		return ap_get_brigade(f->next, bb, mode, readbytes);
+		return ap_get_brigade(f->next, bb, mode, block, readbytes);
 	}
 
 	ctx = SG(server_context);
 
 	INIT_CTX;
 
-	if ((rv = ap_get_brigade(f->next, bb, mode, readbytes)) != APR_SUCCESS) {
+	if ((rv = ap_get_brigade(f->next, bb, mode, block, 
+				 readbytes)) != APR_SUCCESS) {
 		return rv;
 	}
 


Mime
View raw message