Get filename out of a file bucket

2011-07-12 Thread Jason Funk
This seems like it should be trival but it isn't working for me. Relevant code snippets: char * outfn; //apr_palloced later > ... > while ((b = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { > bytes=0; > if(APR_BUCKET_IS_FILE(b)){ //we should handle file buckets > speciall

Re: Get filename out of a file bucket

2011-07-19 Thread Jason Funk
bump ;) On Tue, Jul 12, 2011 at 2:29 PM, Jason Funk wrote: > This seems like it should be trival but it isn't working for > me. Relevant code snippets: > > char * outfn; //apr_palloced later >> ... >> while ((b = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { >> bytes=0; >>

Re: Get filename out of a file bucket

2011-07-26 Thread Jason Funk
For the sake of posterity, I will answer my own question. I was casting my bucket into a file bucket and trying to access it. This was incorrect. I needed to cast the data member of the bucket to the file bucket. Change this line: > rv = apr_file_name_get((const char **)&outfn,((apr_bucket_file