[Modsnake-cvs] (jick) mod_snake/src conn_rec.ifilter.imod_snake.cmod_snake_buf.cmod_snake_buf.hreque
Status: Alpha
Brought to you by:
jick
From: Mod S. C. L. <mod...@so...> - 2002-04-09 20:13:04
|
Mod Snake CVS committal Author : jick Project : mod_snake Module : src Dir : mod_snake/src Modified Files: conn_rec.i filter.i mod_snake.c mod_snake_buf.c mod_snake_buf.h request_rec.i snake_modules.c Log Message: Get up-to-date with Apache 2.0 code changes. =================================================================== RCS file: /cvsroot/modsnake/mod_snake/src/conn_rec.i,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- conn_rec.i 10 Jan 2002 22:29:32 -0000 1.20 +++ conn_rec.i 9 Apr 2002 20:13:03 -0000 1.21 @@ -175,7 +175,7 @@ apr_bucket_brigade *brigade; PyObject *res; - brigade = apr_brigade_create(conn->pool); + brigade = apr_brigade_create(conn->pool, conn->bucket_alloc); if((res = mod_snake_get_apr_bucket_brigade_shadowclass(brigade)) == NULL){ apr_brigade_destroy(brigade); return NULL; =================================================================== RCS file: /cvsroot/modsnake/mod_snake/src/filter.i,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- filter.i 11 Feb 2001 01:24:38 -0000 1.8 +++ filter.i 9 Apr 2002 20:13:03 -0000 1.9 @@ -86,8 +86,14 @@ %} -enum {AP_FTYPE_CONTENT, AP_FTYPE_HTTP_HEADER, AP_FTYPE_TRANSCODE, - AP_FTYPE_CONNECTION, AP_FTYPE_NETWORK }; +enum { + AP_FTYPE_RESOURCE, + AP_FTYPE_CONTENT_SET, + AP_FTYPE_PROTOCOL, + AP_FTYPE_TRANSCODE, + AP_FTYPE_CONNECTION, + AP_FTYPE_NETWORK +}; %readonly typedef struct ap_filter_t { =================================================================== RCS file: /cvsroot/modsnake/mod_snake/src/mod_snake.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- mod_snake.c 7 Jan 2002 06:35:18 -0000 1.29 +++ mod_snake.c 9 Apr 2002 20:13:03 -0000 1.30 @@ -718,7 +718,7 @@ } static -int mod_snake_pre_connection_cb(conn_rec *c){ +int mod_snake_pre_connection_cb(conn_rec *c, void *csd){ return mod_snake_generic_connection_cb(c, SNAKE_HOOK_PRE_CONNECTION); } =================================================================== RCS file: /cvsroot/modsnake/mod_snake/src/mod_snake_buf.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- mod_snake_buf.c 10 Jan 2002 18:54:58 -0000 1.6 +++ mod_snake_buf.c 9 Apr 2002 20:13:03 -0000 1.7 @@ -80,10 +80,11 @@ * On failure, the buffer will not be touched. */ -apr_bucket *mod_snake_buf_bucketize(ModSnakeBuf *buf){ +apr_bucket *mod_snake_buf_bucketize(ModSnakeBuf *buf, apr_bucket_alloc_t *fl){ apr_bucket *res; - if(!(res = apr_bucket_heap_create(buf->data, buf->endp - buf->data, 1))) + if(!(res = apr_bucket_heap_create(buf->data, buf->endp - buf->data, + NULL, fl))) return NULL; return res; } =================================================================== RCS file: /cvsroot/modsnake/mod_snake/src/mod_snake_buf.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- mod_snake_buf.h 27 Jan 2001 20:21:05 -0000 1.4 +++ mod_snake_buf.h 9 Apr 2002 20:13:03 -0000 1.5 @@ -14,7 +14,8 @@ extern ModSnakeBuf *mod_snake_buf_create(int bufsize); extern void mod_snake_buf_append(ModSnakeBuf *buf, const char *data, int len); extern int mod_snake_buf_size_left(ModSnakeBuf *buf); -extern apr_bucket *mod_snake_buf_bucketize(ModSnakeBuf *buf); +extern apr_bucket *mod_snake_buf_bucketize(ModSnakeBuf *buf, + apr_bucket_alloc_t *flist); extern void mod_snake_buf_destroy(ModSnakeBuf *buf); #endif =================================================================== RCS file: /cvsroot/modsnake/mod_snake/src/request_rec.i,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- request_rec.i 10 Jan 2002 22:29:32 -0000 1.32 +++ request_rec.i 9 Apr 2002 20:13:03 -0000 1.33 @@ -225,9 +225,9 @@ if(len < bufleft) /* Return if we didn't fill the buffer */ return 0; - brigade = apr_brigade_create(req->pool); + brigade = apr_brigade_create(req->pool, req->connection->bucket_alloc); /* Always add the bucket we just finished */ - if((bucket = mod_snake_buf_bucketize(buf)) == NULL){ + if(!(bucket = mod_snake_buf_bucketize(buf, req->connection->bucket_alloc))){ mod_snake_buf_destroy(buf); return -1; } @@ -261,8 +261,10 @@ if(!rcfg->curbuf) return ap_rflush(r); - brigade = apr_brigade_create(r->pool); - if((bucket = mod_snake_buf_bucketize(rcfg->curbuf)) == NULL){ + brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); + if((bucket = mod_snake_buf_bucketize(rcfg->curbuf, + r->connection->bucket_alloc)) == NULL) + { mod_snake_buf_destroy(rcfg->curbuf); /* XXX -- Raise an exception? */ return 0; } @@ -420,7 +422,7 @@ apr_bucket_brigade *brigade; PyObject *res; - brigade = apr_brigade_create(rec->pool); + brigade = apr_brigade_create(rec->pool, rec->connection->bucket_alloc); if((res = mod_snake_get_apr_bucket_brigade_shadowclass(brigade)) == NULL){ apr_brigade_destroy(brigade); return NULL; =================================================================== RCS file: /cvsroot/modsnake/mod_snake/src/snake_modules.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- snake_modules.c 7 Jan 2002 06:35:18 -0000 1.29 +++ snake_modules.c 9 Apr 2002 20:13:03 -0000 1.30 @@ -668,14 +668,16 @@ apr_bucket_brigade *brigade; apr_bucket *bucket; - brigade = apr_brigade_create(r->pool); + brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc); if(rcfg->curbuf){ if(res == HTTP_INTERNAL_SERVER_ERROR){ mod_snake_buf_destroy(rcfg->curbuf); mod_snake_destroy_thread_and_unlock(tstate); return res; } - if((bucket = mod_snake_buf_bucketize(rcfg->curbuf)) == NULL){ + if(!(bucket = mod_snake_buf_bucketize(rcfg->curbuf, + r->connection->bucket_alloc))) + { mod_snake_buf_destroy(rcfg->curbuf); PyErr_SetString(PyExc_MemoryError, "failed to bucketize buffer"); mod_snake_destroy_thread_and_unlock(tstate); @@ -683,7 +685,7 @@ } APR_BRIGADE_INSERT_TAIL(brigade, bucket); } - bucket = apr_bucket_eos_create(); + bucket = apr_bucket_eos_create(r->connection->bucket_alloc); APR_BRIGADE_INSERT_TAIL(brigade, bucket); ap_pass_brigade(r->output_filters, brigade); } |